Skip to content

single-char 'x' is not an option hotlink #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
justinmk opened this issue Sep 12, 2022 · 2 comments · Fixed by #16
Closed

single-char 'x' is not an option hotlink #14

justinmk opened this issue Sep 12, 2022 · 2 comments · Fixed by #16

Comments

@justinmk
Copy link
Member

justinmk commented Sep 12, 2022

Noticed this while working on gen_help_html.lua neovim/neovim#11967 .

This is just for reference; as mentioned in #11 (comment) I'm pretty deep into rewriting tree-sitter-vimdoc. Results are promising so far, but will take time.

Problem

The parser currently thinks that 'x' is a link to an option, but that is not correct. single-char surrounded by single-quotes should be treated as a plain word.

  ["'!'"] = true,
  ["'#'"] = true,
  ["'$'"] = true,
  ["'%'"] = true,
  ["'&'"] = true,
  ["'('"] = true,
  ["')'"] = true,
  ["'+'"] = true,
  ["','"] = true,
  ["','sqlKeyword'"] = true,
  ["','sqlOption'"] = true,
  ["','sqlStatement'"] = true,
  ["'-'"] = true,
  ["'-'Z'"] = true,
  ["'.'"] = true,
  ["'/'"] = true,
  ["'0'"] = true,
  ["'1'"] = true,
  ["'2'"] = true,
  ["'4'"] = true,
  ["'8'"] = true,
  ["'9'"] = true,
  ["':'"] = true,
  ["';'"] = true,
  ["'<'"] = true,
  ["'='"] = true,
  ["'>'"] = true,
  ["'?'"] = true,
  ["'@'"] = true,
  ["'A'"] = true,
  ["'B'"] = true,
  ["'C'"] = true,
  ["'D'"] = true,
  ["'E'"] = true,
  ["'F'"] = true,
  ["'G'"] = true,
  ["'H'"] = true,
  ["'I'"] = true,
  ["'J'"] = true,
  ["'K'"] = true,
  ["'L'"] = true,
  ["'M'"] = true,
  ["'N'"] = true,
  ["'O'"] = true,
  ["'P'"] = true,
  ["'Q'"] = true,
  ["'R'"] = true,
  ["'S'"] = true,
  ["'T'"] = true,
  ["'W'"] = true,
  ["'X'"] = true,
  ["'Y'"] = true,
  ["'Z'"] = true,
  ["'['"] = true,
  ["']'"] = true,
  ["'^'"] = true,
  ["'_'"] = true,
  ["'a'"] = true,
  ["'b'"] = true,
  ["'c'"] = true,
  ["'d'"] = true,
  ["'e'"] = true,
  ["'f'"] = true,
  ["'g'"] = true,
  ["'h'"] = true,
  ["'i'"] = true,
  ["'j'"] = true,
  ["'k'"] = true,
  ["'l'"] = true,
  ["'m'"] = true,
  ["'n'"] = true,
  ["'o'"] = true,
  ["'p'"] = true,
  ["'q'"] = true,
  ["'r'"] = true,
  ["'s'"] = true,
  ["'t'"] = true,
  ["'u'"] = true,
  ["'v'"] = true,
  ["'w'"] = true,
  ["'x'"] = true,
  ["'y'"] = true,
  ["'z'"] = true,
  ["'~'"] = true,
  ["'·'"] = true,
  ["'ö'"] = true,
  ["'─'"] = true,
  ["'│'"] = true,
  ["'├'"] = true,
  ["'┤'"] = true,
  ["'┬'"] = true,
  ["'┴'"] = true,
  ["'┼'"] = true,
  ["'보'"] = true,
  ["'세'"] = true,
  ["'여'"] = true,
  ["'요'"] = true,
@vigoux
Copy link
Member

vigoux commented Sep 12, 2022

You say that you are in the process of rewriting the vimdoc parser, where is the source code? I might be able to help, as this parser is pretty badly done and has a lot of technical debt.

@justinmk
Copy link
Member Author

justinmk commented Sep 16, 2022

where is the source code?

PR here: #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants