fix highlighting of powershell v2 multiline comments
This commit is contained in:
parent
e0c721b033
commit
20cf910ade
1 changed files with 16 additions and 4 deletions
|
|
@ -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 : "."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue