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 ) {
|
||||
// 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"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||
regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|=|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[[({]"
|
||||
|
|
@ -1003,13 +1003,13 @@ var PhpLangHighlightRules = function() {
|
|||
"heredoc" : [
|
||||
{
|
||||
onMatch : function(value, currentSate, stack) {
|
||||
if (stack[1] + ";" != value)
|
||||
if (stack[1] != value)
|
||||
return "string";
|
||||
stack.shift();
|
||||
stack.shift();
|
||||
return "markup.list"
|
||||
},
|
||||
regex : "^\\w+;$",
|
||||
regex : "^\\w+(?=;?$)",
|
||||
next: "start"
|
||||
}, {
|
||||
token: "string",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue