Permalink
Browse files

fix ignorecase in createKeywordMapper

  • Loading branch information...
nightwing committed Nov 24, 2012
1 parent 730084b commit c44565ff3adfe2f14ba03f997a21a17779d87360
Showing with 5 additions and 1 deletion.
  1. +4 −1 lib/ace/mode/text_highlight_rules.js
  2. +1 −0 tool/mode_creator.js
@@ -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;
});
View
@@ -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();
};

0 comments on commit c44565f

Please sign in to comment.