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