fix highlighting of ?" in ruby mode
This commit is contained in:
parent
ced37c0c19
commit
55bf8e56d3
4 changed files with 15 additions and 4 deletions
|
|
@ -20,7 +20,7 @@ class Range
|
|||
end
|
||||
end
|
||||
|
||||
{:id => 34, :key => "value"}
|
||||
{:id => ?", :key => "value"}
|
||||
|
||||
|
||||
herDocs = [<<'FOO', <<BAR, <<-BAZ, <<-`EXEC`] #comment
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
[1, +1, -1, 12_345, 0.000_1,
|
||||
_, 3_1, 1_2, 1_.0, 0._1];
|
||||
|
||||
{:id => 34, :key => "value"}
|
||||
{:id => ?", :key => "value", anotherKey: [x, y?]}
|
||||
|
||||
=begin
|
||||
=end
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@
|
|||
["text"," "],
|
||||
["punctuation.separator.key-value","=>"],
|
||||
["text"," "],
|
||||
["constant.numeric","34"],
|
||||
["string.character","?\""],
|
||||
["text",", "],
|
||||
["constant.other.symbol.ruby",":key"],
|
||||
["text"," "],
|
||||
|
|
@ -148,7 +148,15 @@
|
|||
["string.start","\""],
|
||||
["string","value"],
|
||||
["string.end","\""],
|
||||
["paren.rparen","}"]
|
||||
["text",", "],
|
||||
["identifier","anotherKey"],
|
||||
["text",": "],
|
||||
["paren.lparen","["],
|
||||
["identifier","x"],
|
||||
["text",", "],
|
||||
["identifier","y"],
|
||||
["text","?"],
|
||||
["paren.rparen","]}"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
|
|
|
|||
|
|
@ -288,6 +288,9 @@ var RubyHighlightRules = function() {
|
|||
return stack[0];
|
||||
return currentState;
|
||||
}
|
||||
}, {
|
||||
token : "string.character",
|
||||
regex : "\\B\\?."
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue