fix ignorecase in createKeywordMapper
This commit is contained in:
parent
730084b6d1
commit
c44565ff3a
2 changed files with 5 additions and 1 deletions
|
|
@ -97,7 +97,10 @@ var TextHighlightRules = function() {
|
|||
this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) {
|
||||
var keywords = Object.create(null);
|
||||
Object.keys(map).forEach(function(className) {
|
||||
var list = map[className].split(splitChar || "|");
|
||||
var a = map[className];
|
||||
if (ignoreCase)
|
||||
a = a.toLowerCase();
|
||||
var list = a.split(splitChar || "|");
|
||||
for (var i = list.length; i--; )
|
||||
keywords[list[i]] = className;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ var continueRun = function(rules) {
|
|||
var Tokenizer = DebugTokenizer;
|
||||
|
||||
var tk = new Tokenizer(new rules().getRules());
|
||||
editor2.session.$mode.$tokenizer = tk;
|
||||
editor2.session.bgTokenizer.setTokenizer(tk);
|
||||
editor2.renderer.updateText();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue