front_matter_parser
front_matter_parser copied to clipboard
Front matter data in documents without content parsed as content
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)
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.