Let JS line comment rules be not greedy

This commit is contained in:
DanyaPostfactum 2013-06-24 21:06:32 +10:00
commit e2359b2f9f

View file

@ -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",