Update the Markdown Front Matter to use the Yaml Subfilter

Issue #741 resolved
Clement Mouchet
created an issue

We're have issues with complex Front Matter sections from SiteLeaf and Jekyll sites, where complex Yaml structures can be used.

Flexmark shows limits when it comes to putting back the keys in the right place so we decided to use the Yaml subfilter instead.

I've attached a sample that shows what we've seen that drove the changes.

Benefits:

  • Supports specifying exceptions (keys to include/exclude)
  • Supports nested keys (preserves indentation, keys prefixed with - etc.
  • Support keys with spaces
  • Supports filtering the key value pairs using another filter (html, markdown etc…)

New Markdown Filter Option:

config.png

YAML subfilter configuration ID (yamlSubfilter) The custom configuration ID of the YAML filter that will be called to process YAML Metadata Header within Markdown documents. The configuration file must be saved in a known location with .fprm suffix. Specify nothing to use the default YAML filter configuration tailored for the Markdown filter. Default: (empty)

New Yaml Filter Option:

Subfilter Processes Literal As Blocks (subFilterProcessLiteralAsBlock) Set this option to extract all content in a literal block as a single TextUnit rather than processing each line as its own TextUnit. Useful when the literal block contains content that is sub-filtered, or if lines are arbitrarily broken after 80 characters. Default: false