-
Notifications
You must be signed in to change notification settings - Fork 156
Ignore YAML-Header #142
Comments
This seems a little bit difficult to solve. |
I think the best way to do this would be to fork CodeMirror markdown mode to add an option This is a huge work, though. I personally would enjoy doing it but I'm not familiar with CodeMirror modes. Maybe later if I get enough time. |
@darahak So does pandoc. From a few tests, it seems pandoc does some checks (I tried to regex it, but it's not perfect). I guess But at least |
@zommuter CodeMirror parser is working line by line so multiline regex won't work. IMO the correct way to do this is definitely to patch markdown mode. I think any other solution would be very tricky, at least in term of performance. |
Front matter YAML block coud appear only at the beginning of the markdown file so it's pretty simple to cut if off from markdown parsing by checking if the file starts with I mean it should be possible to pass only the remaining part of the file (pure markdown) to CodeMirror (is it used by Abricotine?) and have a separate view (out of the main editor) for showing/editing meta stuff. It could be some form or even just a |
In windows, my YAML front matter is not skipped. |
@chris2fr What does that mean exactly? Can you describe the issue please. |
Since I'm using pandoc, my files usually start with a YAML-block such as
This confuses Abricotine's parser, and if I use YAML-comments (starting with
#
) on a single line, they are interpreted as section headers and thus both confuses the TOC and renders it rather huge. Instead, YAML-headers should be ignored, maybe rendered like comments.The text was updated successfully, but these errors were encountered: