fix highlighting of tables in Gherkin mode

This commit is contained in:
nightwing 2015-05-27 19:56:28 +04:00
commit 9f57989043
2 changed files with 53 additions and 49 deletions

View file

@ -64,7 +64,7 @@ var GherkinHighlightRules = function() {
regex : "<.+>" regex : "<.+>"
}, { }, {
token : "comment", token : "comment",
regex : "\\| ", regex : "\\|(?=.)",
next : "table-item" next : "table-item"
}, { }, {
token : "comment", token : "comment",
@ -96,15 +96,19 @@ var GherkinHighlightRules = function() {
defaultToken: "string" defaultToken: "string"
}], }],
"table-item" : [{ "table-item" : [{
token : "string", token : "comment",
regex : "[A-Za-z0-9 ]*", regex : /$/,
next : "start" next : "start"
}], }, {
token : "comment",
regex : /\|/
}, {
token : "string",
regex : /\\./
}, {
defaultToken : "string"
}]
}; };
//new TextHighlightRules().getRules();
} }
oop.inherits(GherkinHighlightRules, TextHighlightRules); oop.inherits(GherkinHighlightRules, TextHighlightRules);