-
Notifications
You must be signed in to change notification settings - Fork 99
Description
Did you check the tree-sitter docs?
- I have read all the tree-sitter docs if it relates to using the parser
Is your feature request related to a problem? Please describe.
The grammar models the rules for YAML metadata blocks incorrectly as it does not detect the bottom delimiter of the blocks as allowed by one of the established markdown flavors and defined by the YAML spec.
Describe the solution you'd like
Pandoc allows for YAML metadata blocks to be delimited with three dots at the bottom:
A YAML metadata block is a valid YAML object, delimited by a line of three hyphens (---) at the top and a line of three hyphens (---) or three dots (...) at the bottom. The initial line --- must not be followed by a blank line. A YAML metadata block may occur anywhere in the document, but if it is not at the beginning, it must be preceded by a blank line.1
(Pandoc-flavored markdown also allows for the block(s!) to occur anywhere, see #76 )
This is also in line with YAML spec:
YAML uses three dashes (“---”) to separate directives from document content. This also serves to signal the start of a document if no directives are present. Three dots ( “...”) indicate the end of a document without starting a new one, for use in communication channels.2
Describe alternatives you've considered
Using markdown.vim syntax highlights.
Additional context
No response