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 : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
||||||
}, {
|
}, {
|
||||||
token : "string", // multi line string start
|
token : "string", // multi line string start
|
||||||
regex : '["].*\\\\$',
|
regex : '["][\\s\\S]*',
|
||||||
next : "qqstring"
|
next : "qqstring"
|
||||||
}, {
|
}, {
|
||||||
token : "string", // single line
|
token : "string", // single line
|
||||||
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
||||||
}, {
|
}, {
|
||||||
token : "string", // multi line string start
|
token : "string", // multi line string start
|
||||||
regex : "['].*\\\\$",
|
regex : "['][\\s\\S]+",
|
||||||
next : "qstring"
|
next : "qstring"
|
||||||
}, {
|
}, {
|
||||||
token : "constant.numeric", // hex
|
token : "constant.numeric", // hex
|
||||||
|
|
@ -1041,21 +1041,21 @@ var PhpHighlightRules = function() {
|
||||||
"qqstring" : [
|
"qqstring" : [
|
||||||
{
|
{
|
||||||
token : "string",
|
token : "string",
|
||||||
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
|
regex : '"',
|
||||||
next : "start"
|
next : "start"
|
||||||
}, {
|
}, {
|
||||||
token : "string",
|
token : "string",
|
||||||
regex : '.+'
|
regex : '[^"]+'
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
"qstring" : [
|
"qstring" : [
|
||||||
{
|
{
|
||||||
token : "string",
|
token : "string",
|
||||||
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
|
regex : "'",
|
||||||
next : "start"
|
next : "start"
|
||||||
}, {
|
}, {
|
||||||
token : "string",
|
token : "string",
|
||||||
regex : '.+'
|
regex : "[^']+"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"htmlcomment" : [
|
"htmlcomment" : [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue