diff --git a/lib/ace/mode/php/php.js b/lib/ace/mode/php/php.js index a1abc609..ed23f641 100644 --- a/lib/ace/mode/php/php.js +++ b/lib/ace/mode/php/php.js @@ -629,7 +629,7 @@ PHP.Lexer = function( src, ini ) { }, { value: PHP.Constants.T_VARIABLE, - re: /^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ + re: /^\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/ }, { value: PHP.Constants.T_WHITESPACE, @@ -648,7 +648,7 @@ PHP.Lexer = function( src, ini ) { return result; } - var match = result.match( /(?:[^\\]|\\.)*[^\\]\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/g ); + var match = result.match( /(?:[^\\]|\\.)*[^\\]\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/g ); if ( match !== null ) { // string has a variable @@ -675,7 +675,7 @@ PHP.Lexer = function( src, ini ) { } - match = result.match(/^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/); + match = result.match(/^\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/); @@ -689,7 +689,7 @@ PHP.Lexer = function( src, ini ) { result = result.substring( match[ 0 ].length ); - match = result.match(/^(\-\>)\s*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*(\()/); + match = result.match(/^(\-\>)\s*([a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*)\s*(\()/); if ( match !== null ) { @@ -719,7 +719,7 @@ PHP.Lexer = function( src, ini ) { if ( curlyOpen > 0) { re = /^([^\\\$"{}\]\)]|\\.)+/g; } else { - re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\xff]))+/g;; + re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\uffff]))+/g;; } while(( match = result.match( re )) !== null ) { @@ -756,7 +756,7 @@ PHP.Lexer = function( src, ini ) { if (len === result.length) { // nothing has been found yet - if ((match = result.match( /^(([^\\]|\\.)*?[^\\]\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)/g )) !== null) { + if ((match = result.match( /^(([^\\]|\\.)*?[^\\]\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*)/g )) !== null) { return; } } @@ -786,7 +786,7 @@ PHP.Lexer = function( src, ini ) { }, { value: PHP.Constants.T_STRING, - re: /^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ + re: /^[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/ }, { value: -1, diff --git a/lib/ace/mode/php_highlight_rules.js b/lib/ace/mode/php_highlight_rules.js index d0419aca..ca591d1b 100644 --- a/lib/ace/mode/php_highlight_rules.js +++ b/lib/ace/mode/php_highlight_rules.js @@ -969,11 +969,11 @@ var PhpLangHighlightRules = function() { else if (value == "debugger") return "invalid.deprecated"; else - if(value.match(/^(\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|self|parent)$/)) + if(value.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/)) return "variable"; return "identifier"; }, - regex : "[a-zA-Z_$\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\b" + regex : /[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/ }, { onMatch : function(value, currentSate, state) { value = value.substr(3);