fix highlighting of ?" in ruby mode

This commit is contained in:
nightwing 2015-01-07 01:15:36 +04:00
commit 55bf8e56d3
4 changed files with 15 additions and 4 deletions

View file

@ -20,7 +20,7 @@ class Range
end
end
{:id => 34, :key => "value"}
{:id => ?", :key => "value"}
herDocs = [<<'FOO', <<BAR, <<-BAZ, <<-`EXEC`] #comment

View file

@ -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

View file

@ -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"
],[

View file

@ -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)"