clean up string rule for lean-mode
This commit is contained in:
parent
3c34a9852f
commit
34d80e81ca
1 changed files with 9 additions and 5 deletions
|
|
@ -100,12 +100,15 @@ var leanHighlightRules = function() {
|
|||
regex : "\\/-",
|
||||
next : "comment"
|
||||
}, {
|
||||
token : "string", // single line
|
||||
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
||||
stateName: "qqstring",
|
||||
token : "string.start", regex : '"', next : [
|
||||
{token : "string.end", regex : '"', next : "start"},
|
||||
{token : "string", regex : "\\\\$", next : "qqstring"},
|
||||
{token : "string", regex : "\\n$", next : "qqstring"},
|
||||
{token : "constant.language.escape", regex : /\\./},
|
||||
{defaultToken: "string"}
|
||||
]
|
||||
}, {
|
||||
token : "string", // multi line string start
|
||||
regex : '["].*\\\\$',
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "constant.numeric", // hex
|
||||
regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
||||
|
|
@ -141,6 +144,7 @@ var leanHighlightRules = function() {
|
|||
|
||||
this.embedRules(DocCommentHighlightRules, "doc-",
|
||||
[ DocCommentHighlightRules.getEndRule("start") ]);
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(leanHighlightRules, TextHighlightRules);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue