Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting a post with "something:" [colon] will swallow lines #126

Closed
AndreasOM opened this issue Feb 3, 2010 · 3 comments
Closed

Starting a post with "something:" [colon] will swallow lines #126

AndreasOM opened this issue Feb 3, 2010 · 3 comments

Comments

@AndreasOM
Copy link

I had a post that started with

---
layout: default
title: fuuu

---

time: now
date: today
location: here

More text

And the result was that all lines of the content - up to the first blank line - where swallowed in the ouput.

Seems to work with every "xxx: yyy".

If I remove the empty line between the "location:" and the "More text" it works fine.

Not sure what kind of bug I hit,
but I couldn't find anything in the markdown docs.

@andrewheiss
Copy link

This is actually a feature of Maruku, the default Markdown parser in Jekyll.

It has the ability to add document metadata using YAML-esque syntax.

Date: Today

This is real text. Blah blah blah.

Here's some more normal text.

When colon-delimited lines are found at the beginning of a document, Maruku assumes they're metadata and swallows them, including them in hidden meta tags that would ordinarily be placed in the document <head> (but not with Jekyll, since only snippets of Markdown are parsed, not entire documents. Any <meta> tags that would be generated seem to just vanish.)

Actually, if you put colon-delimited lines anywhere in the middle of the document, like so, Maruku will fail:

This is real text. Blah blah blah.

Date: Today

Here's some more normal text.

I don't know of any way to disable this in Maruku. The easiest way to get around it with Jekyll would be to switch the Markdown engine to rdiscount, which doesn't implement any metadata syntax.

@AndreasOM
Copy link
Author

I was assuming something like that.
To bad.
Would love to stop the parsing after the front matter :(

Have switched to rdiscount for now, which has it's own quirks.

@andrewheiss
Copy link

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants