Merge pull request #2516 from ajaxorg/fix/highlighter

fix highlighting of tables in Gherkin  mode
This commit is contained in:
Harutyun Amirjanyan 2015-05-31 16:45:58 +04:00
commit 652dd7009c
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);