Sql Mode: Fixed string highlighting

This commit is contained in:
Jonathan Camile 2011-10-10 17:19:17 +02:00 committed by Fabian Jakobs
commit add0f3f5a2

View file

@ -45,22 +45,12 @@ var SqlHighlightRules = function() {
"start" : [ {
token : "comment",
regex : "--.*$"
}, {
token : "string", // multi line " string start
merge : true,
regex : '".*$',
next : "qqstring"
}, {
token : "string", // " string
regex : '"(?:[^\\\\]|\\\\.)*?"'
}, {
token : "string", // multi line ' string start
merge : true,
regex : "'.*$",
next : "qstring"
regex : '".*"'
}, {
token : "string", // ' string
regex : "'(?:[^\\\\]|\\\\.)*?'"
regex : "'.*'"
}, {
token : "constant.numeric", // float
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
@ -89,24 +79,6 @@ var SqlHighlightRules = function() {
}, {
token : "text",
regex : "\\s+"
} ],
"qqstring" : [ {
token : "string", // multi line " string end
regex : '(?:[^\\\\]|\\\\.)*?"',
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
} ],
"qstring" : [ {
token : "string", // multi line ' string end
regex : "(?:[^\\\\]|\\\\.)*?'",
next : "start"
}, {
token : "string",
merge : true,
regex : '.+'
} ]
};
};