1 unstable release
|0.1.0||Aug 26, 2022|
#197 in Text editors
41 downloads per month
Used in cbfmt
reStructuredText grammar for tree-sitter. Based on the specification from https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html.
Check the playground at https://stsewd.dev/tree-sitter-rst/.
Note: this grammar is still under development, a lot of things may change!
- Allow lists with blank lines between items
- Refactor parse citation and footer reference
- Nested line blocks
- Option lists
- Add some nodes to inline?
- Check if there is a way to re-implement some nodes to JS instead of C?
- A definition list with classifiers can't be separated by a blank line.
- tests, tests, and more tests!
- Nodes that contain body elements inside (like lists or directives),
are inside a node named
- In RST sections are a big node that contains body elements, here they are just a node containing the title. This is to avoid guessing the level of subtitles.
- In RST standalone hyperlinks are
referencenodes, here they are
standalone_hyperlinknodes. This is to avoid confusion with inline references nodes (that are a
- Literal blocks are part of the paragraph they precede, not a separate node, except for the expanded form of literal blocks.
- In rst directives only have "body" node, here the body is parsed as arguments/options/content.
Validate length of adornments in sections?
The spec doesn't mention this, but this paragraph does.
The underline/overline must be at least as long as the title text.
Projects using this grammar
Check the CONTRIBUTING.md file
- tree-sitter-comment: grammar for comment tags like