Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix ignorecase in createKeywordMapper

  • Loading branch information...
commit c44565ff3adfe2f14ba03f997a21a17779d87360 1 parent 730084b
@nightwing nightwing authored
Showing with 5 additions and 1 deletion.
  1. +4 −1 lib/ace/mode/text_highlight_rules.js
  2. +1 −0  tool/mode_creator.js
View
5 lib/ace/mode/text_highlight_rules.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
1  tool/mode_creator.js
@@ -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();
};
Please sign in to comment.
Something went wrong with that request. Please try again.