tree-sitter-norg
tree-sitter-norg copied to clipboard
ranged tags aren't highlighted properly
This doesn't look right. The opening tag is highlighted, while the closing one isn't.
Looking at the TS tree shows that it doesn't parse the segment correctly
This also means that the tags don't do what they're supposed to, and e.g. text inside of the |example
tag is still rendered
UPD: ranged tags work when there's just text inside of them, but some markup like headings or other tags break it.
This seems to be due to ranged tag content expecting a paragraph:
https://github.com/nvim-neorg/tree-sitter-norg/blob/9766442985fd546e2d33f8d1c7e7619ed07860cf/grammar.js#L821
So any non-paragraph markup is disallowed
@vhyrro I think this can be fixed by simply replacing the $.paragraph
selector with a choice similar to what's currently used in $.document
. However, AFAIK the |example
tag should not render the text inside of it. Is it something that's supposed to be implemented in the treesitter parser, or is that functionality on the side of neorg?