parent
c3491f4855
commit
48e672b710
2 changed files with 4 additions and 4 deletions
|
|
@ -816,7 +816,7 @@ PHP.Lexer = function( src, ini ) {
|
||||||
if ( heredoc !== undefined ) {
|
if ( heredoc !== undefined ) {
|
||||||
// we are in a heredoc
|
// we are in a heredoc
|
||||||
|
|
||||||
var regexp = new RegExp('([\\S\\s]*)(\\r\\n|\\n|\\r)(' + heredoc + ')(;|\\r\\n|\\n)',"i");
|
var regexp = new RegExp('([\\S\\s]*?)(\\r\\n|\\n|\\r)(' + heredoc + ')(;|\\r\\n|\\n)',"i");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -988,7 +988,7 @@ var PhpLangHighlightRules = function() {
|
||||||
next: "heredoc"
|
next: "heredoc"
|
||||||
}, {
|
}, {
|
||||||
token : "keyword.operator",
|
token : "keyword.operator",
|
||||||
regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|=|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||||
}, {
|
}, {
|
||||||
token : "paren.lparen",
|
token : "paren.lparen",
|
||||||
regex : "[[({]"
|
regex : "[[({]"
|
||||||
|
|
@ -1003,13 +1003,13 @@ var PhpLangHighlightRules = function() {
|
||||||
"heredoc" : [
|
"heredoc" : [
|
||||||
{
|
{
|
||||||
onMatch : function(value, currentSate, stack) {
|
onMatch : function(value, currentSate, stack) {
|
||||||
if (stack[1] + ";" != value)
|
if (stack[1] != value)
|
||||||
return "string";
|
return "string";
|
||||||
stack.shift();
|
stack.shift();
|
||||||
stack.shift();
|
stack.shift();
|
||||||
return "markup.list"
|
return "markup.list"
|
||||||
},
|
},
|
||||||
regex : "^\\w+;$",
|
regex : "^\\w+(?=;?$)",
|
||||||
next: "start"
|
next: "start"
|
||||||
}, {
|
}, {
|
||||||
token: "string",
|
token: "string",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue