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

unclosed backtick starts a codespan #113

Open
mikesmithgh opened this issue Nov 10, 2023 · 3 comments
Open

unclosed backtick starts a codespan #113

mikesmithgh opened this issue Nov 10, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@mikesmithgh
Copy link

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 👍

@mikesmithgh mikesmithgh changed the title bug(codespan): a single preceded by a space starts a codespan without ending bug(codespan): a single backtick preceded by a space starts a codespan without ending backtick Nov 10, 2023
@justinmk justinmk added the bug Something isn't working label Nov 13, 2023
@justinmk
Copy link
Member

justinmk commented Nov 13, 2023

confirmed via :InspectTree, though I don't see how. The grammar rule is defined as requiring a closing backtick:

codespan: ($) => _word($, /[^``\n]+/, '`', '`'),

@justinmk justinmk changed the title bug(codespan): a single backtick preceded by a space starts a codespan without ending backtick unclosed backtick preceded by a space starts a codespan Nov 13, 2023
@justinmk justinmk changed the title unclosed backtick preceded by a space starts a codespan unclosed backtick space starts a codespan Nov 13, 2023
@justinmk justinmk changed the title unclosed backtick space starts a codespan unclosed backtick starts a codespan Oct 24, 2024
@xian-wen
Copy link

xian-wen commented Oct 25, 2024

Similar to the >, the text below > is highlighted as codeblock.

- the Visual area '< and '>
- line numbers in placed signs
- line numbers in quickfix positions
- positions in the |jumplist|
- positions in the |tagstack|
These items will still be adjusted:
- previous context mark ''
- the cursor position
- the view of a window on a buffer
- folds
- diffs

Image

@clason

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants