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

Highlighting issue when encountering \{ in a string #1

Open
dusty-phillips opened this issue Jul 3, 2023 · 1 comment
Open

Highlighting issue when encountering \{ in a string #1

dusty-phillips opened this issue Jul 3, 2023 · 1 comment
Labels
accepting contributions Contributions from non-maintainers are accepted bug

Comments

@dusty-phillips
Copy link

dusty-phillips commented Jul 3, 2023

simple repro:

let foo = "abc\{"
let bar

inko.vim highlights the second line as if it's still a member of the string.

I suspect it thinks that the opening { is changing to template literal mode and is ignoring the \ escape.

@yorickpeterse
Copy link
Contributor

Seems I missed this due to some GitHub notifications SNAFU. Either way, Vim syntax highlighting is a bit of a mystery/gamble. The embed rule is as follows:

syn region inkoStringEmbed matchgroup=inkoStringEmbedDelimiter
    \ start="{" end="}" skip="\\\\\|\\{" contains=TOP contained

My guess is the skip attribute isn't right here, though I'm not sure what it should be instead.

@yorickpeterse yorickpeterse added accepting contributions Contributions from non-maintainers are accepted bug labels Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting contributions Contributions from non-maintainers are accepted bug
Projects
None yet
Development

No branches or pull requests

2 participants