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

Front matter data in documents without content parsed as content #13

Open
ralfebert opened this issue Oct 4, 2021 · 1 comment
Open

Comments

@ralfebert
Copy link

For a document that contains only a front matter block but no content, FrontMatterParser returns the front matter data as content:

FrontMatterParser::Parser.new(:md).call("---\ntest: 1\n---")
 => #<FrontMatterParser::Parsed:0x0000000128c1d008 @front_matter={}, @content="---\ntest: 1\n---">

(Adding just a single newline after the block makes it parse correctly)

@waiting-for-dev
Copy link
Owner

Thanks for reporting, @ralfebert. Does it happen with any syntax?

I won't be able to look into it for a month at least, so feel free to submit a PR if it's something urgent for you. Otherwise, I'll happily look into it once I'm back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants