-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Escaped bracket not ignored #532
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
Comments
What #455 did was remove the attempt to ignore quoted braces. That means both |
I understand what issue was solved with #455, what I meant was that the OPs second point wasn't addressed by the PR that closed that issue. instead of commenting there I opened a new issue. |
I see what you mean now. Since both backslash escapes and single quotes are a form of quoting, why should |
I can't think of a general rule that satisfies all cases, but here are a couple examples that led me to this issue: Quoted bracket that should be highlighted, such as executing an SQL query from the command line. In this case highlighting is desired: $ sqlite mydata.db 'SELECT COUNT(mynumber) AS number FROM mytable;' Escaped brackets in a regex expression shouldn't be highlighted grep '\[+' myfile |
More cases for y'all: |
I could see adding a case
If you want to add that, could you also add a few tests for it? |
I would be happy to add some tests, but I have no idea where to start or
how to test - I'm going to look at test-highlighting.zsh for guidance.
Thanks for the example tests
Op za 22 sep. 2018 19:40 schreef Matthew Martin <[email protected]>:
… I could see adding a case
\\)
(( SOME_VAR )) && pos++
;;
If you want to add that, could you also add a few tests for it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#532 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMTd7KSkCZ6fYfJoJeTwpi8iWgstSP7vks5udnX4gaJpZM4WqG2K>
.
|
There are some docs at https://github.com/zsh-users/zsh-syntax-highlighting/tree/master/tests . If anything is unclear there, please point it out. |
Technically a repost of Issue #138 (the second part of the issue was not addressed in #455)
The following snippet incorrectly renders the last bracket as an error:
The text was updated successfully, but these errors were encountered: