Recognize Ruby identifiers beginning with _
:_foo, @_foo, $_foo, and { _foo: 1 } are all valid Ruby syntax, but were not recognized by the highlighter.
This commit is contained in:
parent
47be98f1fc
commit
c409bce579
|
@ -38,7 +38,7 @@ add-highlighter shared/ruby/backtick/interpolation region -recurse \{ \Q#{ \} fi
|
|||
add-highlighter shared/ruby/regex/ default-region fill meta
|
||||
add-highlighter shared/ruby/regex/interpolation region -recurse \{ \Q#{ \} fill meta
|
||||
|
||||
add-highlighter shared/ruby/code/ regex \b([A-Za-z]\w*:(?!:))|([$@][A-Za-z]\w*)|((?<!:):(([A-Za-z]\w*[=?!]?)|(\[\]=?)))|([A-Z]\w*|^|\h)\K::(?=[A-Z]) 0:variable
|
||||
add-highlighter shared/ruby/code/ regex \b(\w+:(?!:))|([$@]\w+)|((?<!:):((\w+[=?!]?)|(\[\]=?)))|([A-Z]\w*|^|\h)\K::(?=[A-Z]) 0:variable
|
||||
|
||||
evaluate-commands %sh{
|
||||
# Grammar
|
||||
|
|
Loading…
Reference in New Issue
Block a user