pull/125/head
nightwing 2015-08-09 14:40:51 +04:00
rodzic 83d122faea
commit 8e48f77a13
3 zmienionych plików z 15 dodań i 9 usunięć

Wyświetl plik

@ -95,7 +95,7 @@
["meta.tag.any.jade"," test"],
["punctuation","("],
["entity.other.attribute-name.jade","id"],
["text","="],
["punctuation","="],
["string","\"tag\""],
["punctuation",")"]
],[
@ -103,15 +103,15 @@
["meta.tag.any.jade"," header"],
["punctuation","("],
["entity.other.attribute-name.jade","id"],
["text","="],
["punctuation","="],
["string","\"tag\""],
["text",", "],
["entity.other.attribute-name.jade","blah"],
["text","="],
["punctuation","="],
["string","\"foo\""],
["text",", "],
["entity.other.attribute-name.jade","meh"],
["text","="],
["punctuation","="],
["string","\"aads\""],
["punctuation",")"]
],[

Wyświetl plik

@ -230,13 +230,9 @@ var JadeHighlightRules = function() {
regex : '"(?=.)',
next : "qqstring"
},
{
token: "entity.other.attribute-name.jade",
regex: "\\b[a-zA-Z\\-:]+"
},
{
token: ["entity.other.attribute-name.jade", "punctuation"],
regex: "\\b([a-zA-Z:\\.-]+)(=)",
regex: "([a-zA-Z:\\.-]+)(=)?",
next: "attribute_strings"
},
{
@ -255,6 +251,11 @@ var JadeHighlightRules = function() {
token : "string",
regex : '"(?=.)',
next : "qqstring"
},
{
token : "string",
regex : '(?=\\S)',
next : "tag_attributes"
}
],
"qqstring" : [

5
node_modules/ace/lib/ace/tokenizer.js wygenerowano vendored
Wyświetl plik

@ -213,6 +213,11 @@ var Tokenizer = function(rules) {
if (lastCapture.end != null && /^\)*$/.test(src.substr(lastCapture.end)))
src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end);
}
// this is needed for regexps that can match in multiple ways
if (src.charAt(0) != "^") src = "^" + src;
if (src.charAt(src.length - 1) != "$") src += "$";
return new RegExp(src, (flag||"").replace("g", ""));
};