Fix error in IE8 when escapeRules is not passed
This commit is contained in:
parent
34127fab8c
commit
023bf6237c
1 changed files with 5 additions and 3 deletions
|
|
@ -81,9 +81,11 @@ var TextHighlightRules = function() {
|
|||
|
||||
this.addRules(embedRules, prefix);
|
||||
|
||||
var addRules = Array.prototype[append ? "push" : "unshift"];
|
||||
for (var i = 0; i < states.length; i++)
|
||||
addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules));
|
||||
if (escapeRules) {
|
||||
var addRules = Array.prototype[append ? "push" : "unshift"];
|
||||
for (var i = 0; i < states.length; i++)
|
||||
addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules));
|
||||
}
|
||||
|
||||
if (!this.$embeds)
|
||||
this.$embeds = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue