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"
|
next : "comment_regex_allowed"
|
||||||
}, {
|
}, {
|
||||||
token : "comment",
|
token : "comment",
|
||||||
regex : "\\/\\/.*$",
|
regex : "\\/\\/",
|
||||||
next : "start"
|
next : "line_comment"
|
||||||
}, {
|
}, {
|
||||||
token: "string.regexp",
|
token: "string.regexp",
|
||||||
regex: "\\/",
|
regex: "\\/",
|
||||||
|
|
@ -309,6 +309,10 @@ var JavaScriptHighlightRules = function() {
|
||||||
{token : "comment", regex : "\\*\\/", next : "no_regex"},
|
{token : "comment", regex : "\\*\\/", next : "no_regex"},
|
||||||
{defaultToken : "comment"}
|
{defaultToken : "comment"}
|
||||||
],
|
],
|
||||||
|
"line_comment" : [
|
||||||
|
{token : "comment", regex : "$", next : "start"},
|
||||||
|
{defaultToken : "comment"}
|
||||||
|
],
|
||||||
"qqstring" : [
|
"qqstring" : [
|
||||||
{
|
{
|
||||||
token : "constant.language.escape",
|
token : "constant.language.escape",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue