You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dollar sign ($) and the underscore (_) are permitted anywhere in an identifier. The dollar sign is intended for use only in mechanically generated code.
Thus, the following code is highlighted wrong:
$test=$(".test");$function="this is an identifier, not a keyword";some$var$=1;
In the above snippet, (?<![a-zA-Z_])\$(?![a-zA-Z_]) matches only the dollar sign in $(".test") and should be matched as variable.other.dollar-sign or similar.
From @FichteFoll on August 20, 2014 22:41
Dollar signs (
$
) are valid characters for any javascript identifier, which probably everyone knows since jQuery.From the ECMAScript specification:
Thus, the following code is highlighted wrong:
In the above snippet,
(?<![a-zA-Z_])\$(?![a-zA-Z_])
matches only the dollar sign in$(".test")
and should be matched asvariable.other.dollar-sign
or similar.Copied from original issue: sublimehq/sublime_text#431
The text was updated successfully, but these errors were encountered: