-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature suggestion: Support GFM YAML metadata block #66
Comments
Supporting this would be fine with me. I'll add this to the todo list. If anyone would like to submit a patch for this, that would be helpful. The existing Pandoc and MultiMarkdown metadata parsing functions should serve as good examples. |
Cool, thanks. I may give it a try myself when I have time. |
also add testing and allow multiple pandoc metadata fix jrblevin#66
Also allow multiple pandoc metadata, with tests. Fix jrblevin#66.
Also allow multiple pandoc metadata, with tests. Fix jrblevin#66.
Also allow multiple pandoc metadata, with tests. Fix jrblevin#66.
I made a pull request that seems to fix this. It's unfortunate that YAML is actually kinda hard to parse in its entirety; this doesn't attempt to highlight outside of simple |
- Also allow multiple pandoc metadata, with tests. Fix jrblevin#66. - Add defvar for markdown-search-until-condition - Update with comments from @syohex
Also allow multiple pandoc metadata, with tests. Fix jrblevin#66.
I have merged @cosmicexplorer PR(#91). Please check latest version. If you have still problems, please reopen the issue and report us. |
This isn't working in pandoc 2.5. |
Some Markdown implementations, e.g., GFM and Pandoc, support YAML metadata blocks. For GFM (according to testing, since it seems undocumented) the YAML block must start at the beginning at the document (even blank lines before it are not allowed) and be wrapped in
---
(exactly three dashes) at the opening and closing, so an example document would beand this will be rendered like
Note that the blank line after the closing
---
line is optional.(Pandoc, on the other hand, has very lax rules for YAML metadata blocks, which allows them to be placed anywhere in the document, and allows closing with
...
instead of---
. But Pandoc Markdown doesn't need to be supported.)Currently, the line immediately above the closing
---
is interpreted as a setext header, which looks rather weird (especially if you have a real header):Would you please consider supporting the metadata block? I suppose the block itself could be highlighted just like a fenced code block, and I suppose it shouldn't be too hard to adapt the parsing code of fenced code blocks to this particular block. Thanks.
The text was updated successfully, but these errors were encountered: