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

Bash regex containing single-quote space next to string literal breaks highlighting beyond its point #275

Open
mooreye opened this issue Sep 27, 2024 · 0 comments

Comments

@mooreye
Copy link

mooreye commented Sep 27, 2024

Consider the attached snippet. It contains a Bash regex that checks if a variable contains a (note the space). However when using Treesitter, everything beyond the first ' character in the regex is unhighlighted, until the end of the document.

Issue first detected in Neovim. With treesitter plugin disabled, it works fine.

Example snippet that causes the problem

#!/usr/bin/bash

v='a b'
if [[ $v =~ a' ' ]]; then
    echo ok
fi

Example screenshot

image

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

No branches or pull requests

1 participant