diff --git a/lib/ace/mode/powershell_highlight_rules.js b/lib/ace/mode/powershell_highlight_rules.js index 2703d8b7..5c5bcbf4 100644 --- a/lib/ace/mode/powershell_highlight_rules.js +++ b/lib/ace/mode/powershell_highlight_rules.js @@ -11,11 +11,6 @@ var PowershellHighlightRules = function() { ("function|if|else|elseif|switch|while|default|for|do|until|break|continue|foreach|return|filter|in|trap|throw|param|begin|process|end").split("|") ); - var buildinConstants = lang.arrayToMap( - ("$Null|$True|$False").split("|") - ); - - // regexp must not have capturing parentheses. Use (?:) instead. // regexps are ordered -> the first match is used @@ -24,9 +19,6 @@ var PowershellHighlightRules = function() { { token : "comment", regex : "#.*$" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' @@ -41,15 +33,14 @@ var PowershellHighlightRules = function() { regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : "constant.language.boolean", - regex : "(?:true|false)\\b" + regex : "[$](?:[Tt]rue|[Ff]alse)\\b" + }, { + token : "constant.language.boolean", + regex : "[$][Nn]ull\\b" }, { token : function(value) { - if (value == "this") - return "variable.language"; - else if (keywords.hasOwnProperty(value)) + if (keywords.hasOwnProperty(value)) return "keyword"; - else if (buildinConstants.hasOwnProperty(value)) - return "constant.language"; else return "identifier"; },