mjbvz / vscode-markdown-yaml-preamble

Makes yaml front matter render as a table in VS Code's built-in markdown preview:
MIT License
11 stars 4 forks source link

Three dots as valid YAML end #1

Open crystalfp opened 5 years ago

crystalfp commented 5 years ago

I have markdown files in which the YAML block is terminated by three dots and not three dashes. Is it possible to add this (valid) block end indicator to the extension? Thanks! An example:

---
pagetitle: Persistent Identifiers
author: Myself 
lang: en
...

# Persistent Identifiers
Bla bla
RokeJulianLockhart commented 1 year ago

https://github.com/mjbvz/vscode-markdown-yaml-preamble/issues/1#issue-407569036

@crystalfp, is that valid Markdown YAML preamble?

crystalfp commented 1 year ago

It is accepted by pandoc.

redactedscribe commented 1 year ago

It is valid, and unsupported by the extension sadly.

A document begins with --- and ends with .... Both are optional, though a ... can only be followed by directives or ---. [...] Documents may be preceded by directives, in which case the --- is required to indicate the end of the directives.

- camel.readthedocs.io


The extension Markdown Preview Enhanced also provides displaying of YAML preamble, albeit not via the native Markdown preview window, and is bundled with a lot of unrelated features. Despite 4M downloads, it also doesn't support the three dots as YAML document end...

To show the preamble in the extension's Markdown preview, use setting:

"markdown-preview-enhanced.frontMatterRenderingOption": "code block", // or "table"