summaryrefslogtreecommitdiff
path: root/common/modules/highlight.jsm
diff options
context:
space:
mode:
Diffstat (limited to 'common/modules/highlight.jsm')
-rw-r--r--common/modules/highlight.jsm10
1 files changed, 6 insertions, 4 deletions
diff --git a/common/modules/highlight.jsm b/common/modules/highlight.jsm
index 96a142e0..d5d7f711 100644
--- a/common/modules/highlight.jsm
+++ b/common/modules/highlight.jsm
@@ -147,11 +147,13 @@ const Highlights = Module("Highlight", {
*
* @param {string} class
*/
- selector: function (class_)
- class_.replace(/(^|\s)([A-Z]\w+)\b/g,
+ selector: function (class_) {
+ const self = this;
+ return class_.replace(/(^|\s)([A-Z]\w+)\b/g,
function (m, n1, hl) n1 +
- (this.highlight[hl] && this.highlight[hl].class != class_
- ? this.highlight[hl] : "[dactyl|highlight~=" + hl + "]")),
+ (self.highlight[hl] && self.highlight[hl].class != class_
+ ? self.highlight[hl] : "[dactyl|highlight~=" + hl + "]"));
+ },
/**
* Clears all highlighting rules. Rules with default values are