create tokenizer only when needed
This commit is contained in:
parent
bc4b1324b7
commit
811d190c95
95 changed files with 122 additions and 281 deletions
|
|
@ -27,9 +27,9 @@ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutd
|
|||
|
||||
var Mode = function(suppressHighlighting) {
|
||||
if (suppressHighlighting)
|
||||
this.$tokenizer = new Tokenizer(new TextHighlightRules().getRules());
|
||||
this.HighlightRules = TextHighlightRules;
|
||||
else
|
||||
this.$tokenizer = new Tokenizer(new TexHighlightRules().getRules());
|
||||
this.HighlightRules = TexHighlightRules;
|
||||
this.$outdent = new MatchingBraceOutdent();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue