neovim / tree-sitter-vimdoc

Tree-sitter parser for Vim help files
Apache License 2.0
103 stars 13 forks source link

unclosed backtick space starts a codespan #113

Open mikesmithgh opened 11 months ago

mikesmithgh commented 11 months ago

NVIM v0.10.0-dev-1500+g3128cff6b-dirty

For example, the line underlined by ^ is all highlighted as a codeblock even though there is no closing backtick

'<  `<          To the first line or character of the last selected
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  

Screenshot of motion.txt with set cole=0

motion.txt

The website repeats a character in this scenario

'<<         To the first line or character of the last selected

Screenshot of Neovim online help

neovim-help

See :h `< See https://neovim.io/doc/user/motion.html#%60%3C

If you need any additional info please let me know 👍

justinmk commented 11 months ago

confirmed via :InspectTree, though I don't see how. The grammar rule is defined as requiring a closing backtick: https://github.com/neovim/tree-sitter-vimdoc/blob/60045f7d717eba85fa8abd996e0bb50eed5a3d8e/grammar.js#L210