Let JS line comment rules be not greedy
This commit is contained in:
parent
25853c11a1
commit
e2359b2f9f
1 changed files with 6 additions and 2 deletions
|
|
@ -215,8 +215,8 @@ var JavaScriptHighlightRules = function() {
|
|||
next : "comment_regex_allowed"
|
||||
}, {
|
||||
token : "comment",
|
||||
regex : "\\/\\/.*$",
|
||||
next : "start"
|
||||
regex : "\\/\\/",
|
||||
next : "line_comment"
|
||||
}, {
|
||||
token: "string.regexp",
|
||||
regex: "\\/",
|
||||
|
|
@ -309,6 +309,10 @@ var JavaScriptHighlightRules = function() {
|
|||
{token : "comment", regex : "\\*\\/", next : "no_regex"},
|
||||
{defaultToken : "comment"}
|
||||
],
|
||||
"line_comment" : [
|
||||
{token : "comment", regex : "$", next : "start"},
|
||||
{defaultToken : "comment"}
|
||||
],
|
||||
"qqstring" : [
|
||||
{
|
||||
token : "constant.language.escape",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue