You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Parser and Formatter to transform markdown documents and produce markdown documents. The problem is that YAML frontmatter when using YamlFrontmatterExtension with nested lists are not preserved when rendering back into markdown.
Add: YamlFrontMatterValue node containing yaml value(s) inserted as children of YamlFrontMatterNode
Fix: change stored key as BasedSequence instead of string, can be retrieved as YamlFrontMatterNode.getKeySequence()
Add: code to return List<String> from child nodes of YamlFrontMatterNode
Fix: resolve offsets in YamlFrontMatterNode and YamlFrontMatterValue nodes.
The changes do not properly parse list values, this is a limitation of the original yaml parser implementation and without rewriting it for full Yaml syntax cannot be fixed. I would not recommend using the block key/values parsed for anything but simple values.
I am OK with the limitation that YamlFrontMatterNode doesn't support all of YAML (it's a huge spec!). This issue is primarily about preserving the original formatting of the frontmatter block when the YamlFrontMatterNode is unchanged. In my particular use-case, I only transform code fences.
I am using
Parser
andFormatter
to transform markdown documents and produce markdown documents. The problem is that YAML frontmatter when usingYamlFrontmatterExtension
with nested lists are not preserved when rendering back into markdown.Parser
Formatter
YamlFrontmatterExtension
A frontmatter block like this
renders into the following output
I expected the rendered output to be the same as the input.
Minimal reproduction code example in Scala.
A workaround is to unlink the frontmatter block and prepend it's chars to rendered output.
The text was updated successfully, but these errors were encountered: