fix highlighting of powershell v2 multiline comments

This commit is contained in:
nightwing 2012-10-24 23:16:48 +04:00
commit 20cf910ade

View file

@ -73,6 +73,10 @@ var PowershellHighlightRules = function() {
{ {
token : "comment", token : "comment",
regex : "#.*$" regex : "#.*$"
}, {
token : "comment.start",
regex : "<#",
next : "comment"
}, { }, {
token : "string", // single line token : "string", // single line
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
@ -118,13 +122,21 @@ var PowershellHighlightRules = function() {
], ],
"comment" : [ "comment" : [
{ {
token : "comment", // closing comment token : "comment.end",
regex : ".*?\\*\\/", regex : "#>",
next : "start" next : "start"
}, { }, {
token : "comment", // comment spanning whole line token : "doc.comment.tag",
merge : true, merge : true,
regex : ".+" regex : "^\\.\\w+"
}, {
token : "comment",
merge : true,
regex : "\\w+"
}, {
token : "comment",
merge : true,
regex : "."
} }
] ]
}; };