Skip to content
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

backtick( and backtick{ start inline code block #143

Closed
xian-wen opened this issue Oct 24, 2024 · 5 comments
Closed

backtick( and backtick{ start inline code block #143

xian-wen opened this issue Oct 24, 2024 · 5 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@xian-wen
Copy link

Sorry, if this is a duplicate of any other issues, forgive me, please. Thank you so much.
Problem
On the latest stable Neovim, the help.txt file does not highlight correctly. Especially for characters following ` (single backtick), all are highlighted just like a comment starting from the open backtick to the end of line.
See the details here neovim/neovim#30930.

@justinmk
Copy link
Member

sample text:

							*'(* *`(*
'(  `(			To the start of the current sentence, like the |(|
			command.

							*')* *`)*
')  `)			To the end of the current sentence, like the |)|
			command.

							*'{* *`{*
'{  `{			To the start of the current paragraph, like the |{|
			command.

							*'}* *`}*
'}  `}			To the end of the current paragraph, like the |}|
			command.

@justinmk justinmk added the bug Something isn't working label Oct 24, 2024
@justinmk justinmk changed the title help highlight seems not correct ( and { start inline code block Oct 24, 2024
@justinmk justinmk changed the title ( and { start inline code block "(" and "{" start inline code block Oct 24, 2024
@justinmk justinmk changed the title "(" and "{" start inline code block ( and { start inline code block Oct 24, 2024
@justinmk justinmk changed the title ( and { start inline code block ( and { start inline code block Oct 24, 2024
@justinmk justinmk changed the title ( and { start inline code block backtick( and backtick{ start inline code block Oct 24, 2024
@justinmk
Copy link
Member

justinmk commented Oct 24, 2024

I am not sure this is worth "fixing" but can track it here for now. The parser is doing the correct thing for this help text.

related:

@xian-wen
Copy link
Author

xian-wen commented Oct 24, 2024

Thank you so much for the modification. In fact, it is not only backtick( and backtick{, it is backtick(mark). Any marks (expect the backtick mark itself) following backtick have the same issue. See :h motion.txt.

@clason
Copy link
Member

clason commented Oct 24, 2024

Yes, I don't think this can be solved without lookahead (i.e., an external scanner). It's usually better to rewrite the docs to avoid these situations (e.g., use quotes).

@justinmk
Copy link
Member

In fact, it is not only backtick( and backtick{, it is backtick(mark). Any marks following backtick have the same issue. See :h motion.txt.

Duplicate of #113

@justinmk justinmk added the duplicate This issue or pull request already exists label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants