diff --git a/lib/ace/mode/powershell_highlight_rules.js b/lib/ace/mode/powershell_highlight_rules.js index 29071a3b..28117226 100644 --- a/lib/ace/mode/powershell_highlight_rules.js +++ b/lib/ace/mode/powershell_highlight_rules.js @@ -73,6 +73,10 @@ var PowershellHighlightRules = function() { { token : "comment", regex : "#.*$" + }, { + token : "comment.start", + regex : "<#", + next : "comment" }, { token : "string", // single line regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' @@ -118,13 +122,21 @@ var PowershellHighlightRules = function() { ], "comment" : [ { - token : "comment", // closing comment - regex : ".*?\\*\\/", + token : "comment.end", + regex : "#>", next : "start" }, { - token : "comment", // comment spanning whole line + token : "doc.comment.tag", merge : true, - regex : ".+" + regex : "^\\.\\w+" + }, { + token : "comment", + merge : true, + regex : "\\w+" + }, { + token : "comment", + merge : true, + regex : "." } ] };