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
.sublime-syntax - with_prototype doesn't support variables #1488
Milestone
Comments
I'm tempted to push this to major considering how much time I lost because of it and how intransparent it is to figure out, although not many people are going to encounter it ... |
Just came here to say that I encountered the same problem. Even if this is intended, at least a small sentence in the documentation would be nice. |
This was fixed in build 4075 |
jfcherng
added a commit
to jfcherng-sublime/ST-Official-Packages
that referenced
this issue
Jul 10, 2020
As of ST 4075, we can use variable in with_prototype. sublimehq/sublime_text#1488 (comment) Signed-off-by: Jack Cherng <jfcherng@gmail.com>
jfcherng
added a commit
to jfcherng-sublime/ST-Official-Packages
that referenced
this issue
Jul 17, 2020
As of ST 4075, we can use variable in with_prototype. sublimehq/sublime_text#1488 (comment) Signed-off-by: Jack Cherng <jfcherng@gmail.com>
wbond
pushed a commit
to sublimehq/Packages
that referenced
this issue
Jul 20, 2020
* [PHP] Add highlight for multiline regex string Example: $regex = '/ a{0,6} // ^^^^^ keyword.operator.quantifier.regexp /ux'; * [PHP] Add variable: regex_modifier As of ST 4075, we can use variable in with_prototype. sublimehq/sublime_text#1488 (comment) * [PHP] Support comment highlighting in multiline regexes This is not accurate since that we don't check the "x" modifier is used but I think people won't write regexes in multiline if not using "x" modifier. The leading "\s" before "#" is a compromise as well. Even though, I think this is still good to have.
mitranim
pushed a commit
to mitranim/Packages
that referenced
this issue
Mar 25, 2022
* [PHP] Add highlight for multiline regex string Example: $regex = '/ a{0,6} // ^^^^^ keyword.operator.quantifier.regexp /ux'; * [PHP] Add variable: regex_modifier As of ST 4075, we can use variable in with_prototype. sublimehq/sublime_text#1488 (comment) * [PHP] Support comment highlighting in multiline regexes This is not accurate since that we don't check the "x" modifier is used but I think people won't write regexes in multiline if not using "x" modifier. The leading "\s" before "#" is a compromise as well. Even though, I think this is still good to have.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
.sublime-syntax
definitions -with_prototype
doesn't support variablesExpected behavior
Variables would work in
with_prototype
constructsActual behavior
Variables don't work in
with_prototype
constructsSteps to reproduce
Create a syntax definition (
example.sublime-syntax
) in the User package folder with the following contents:Create a new view, set the syntax highlighting to the definition just created.
Type/paste:
notice that "
{{example}}
" is scoped asconstant.character.escape.variable-prototype.example
, and "\a\b\c
" isconstant.character.escape.non-prototype.example
instead ofconstant.character.escape.variable-prototype.example
If this is intended, the documentation at http://www.sublimetext.com/docs/3/syntax.html needs to be updated accordingly
Environment
The text was updated successfully, but these errors were encountered: