vsch / flexmark-java

CommonMark/Markdown Java parser with source level AST. CommonMark 0.28, emulation of: pegdown, kramdown, markdown.pl, MultiMarkdown. With HTML to MD, MD to PDF, MD to DOCX conversion modules.
BSD 2-Clause "Simplified" License
2.28k stars 270 forks source link

YamlFrontMatterBlockParser ignores multi-key list items #99

Open tingley opened 7 years ago

tingley commented 7 years ago

Probably an unusual case, but I have content like this:

---

section:
    - title: Front Matter Test Case
      note: |
        This content should be exposed.
    - title: Second Test case
      note: This content should also be exposed
---

This is the body content.

I'm using YamlFrontMatterExtension to try to process this content. However, the values of the note properties are never visited. When the parser sees something that looks like a list item (title, here), it adds that line as a node value. However, the subsequent note lines don't match any of the known patterns, and those lines are skipped.

vsch commented 7 years ago

@tingley, thank you for the report. I will take a look at the extension. The extension was inherited from commonmark-java and I have not modified it beyond changes caused by core implementation. I will address it shortly.