Merge pull request #695 from ajaxorg/highlighting/php

Improve multiline string rules
This commit is contained in:
Zef Hemel 2012-04-03 23:32:50 -07:00
commit daee6d1c3f

View file

@ -952,14 +952,14 @@ var PhpHighlightRules = function() {
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
token : "string", // multi line string start
regex : '["].*\\\\$',
regex : '["][\\s\\S]*',
next : "qqstring"
}, {
token : "string", // single line
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
}, {
token : "string", // multi line string start
regex : "['].*\\\\$",
regex : "['][\\s\\S]+",
next : "qstring"
}, {
token : "constant.numeric", // hex
@ -1041,21 +1041,21 @@ var PhpHighlightRules = function() {
"qqstring" : [
{
token : "string",
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
regex : '"',
next : "start"
}, {
token : "string",
regex : '.+'
}
regex : '[^"]+'
},
],
"qstring" : [
{
token : "string",
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
regex : "'",
next : "start"
}, {
token : "string",
regex : '.+'
regex : "[^']+"
}
],
"htmlcomment" : [