Merge pull request #695 from ajaxorg/highlighting/php
Improve multiline string rules
This commit is contained in:
commit
daee6d1c3f
1 changed files with 7 additions and 7 deletions
|
|
@ -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" : [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue