diff options
author | Kris Maglione <maglione.k@gmail.com> | 2010-11-19 16:30:38 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2010-11-19 16:30:38 -0500 |
commit | 2df24c410d67dfc8661d99797870b5d51ccfb67c (patch) | |
tree | cd4109e6ed957846fdd951eea589106e4a0514d9 /common/modules/highlight.jsm | |
parent | 8b1a5132b7a728ed7e3e3db7e69e79fb402a2111 (diff) | |
download | pentadactyl-2df24c410d67dfc8661d99797870b5d51ccfb67c.tar.gz |
Open the firstrun page in a new tab.
Diffstat (limited to 'common/modules/highlight.jsm')
-rw-r--r-- | common/modules/highlight.jsm | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/common/modules/highlight.jsm b/common/modules/highlight.jsm index fc116045..44ac3a04 100644 --- a/common/modules/highlight.jsm +++ b/common/modules/highlight.jsm @@ -48,8 +48,7 @@ Highlight.prototype.toString = function () .join("\n\t"); /** - * A class to manage highlighting rules. The parameters are the - * standard parameters for any {@link Storage} object. + * A class to manage highlighting rules. * * @author Kris Maglione <maglione.k@gmail.com> */ @@ -147,13 +146,12 @@ const Highlights = Module("Highlight", { * * @param {string} class */ - selector: function (class_) { - const self = this; - return class_.replace(/(^|\s)([A-Z]\w+)\b/g, - function (m, n1, hl) n1 + - (self.highlight[hl] && self.highlight[hl].class != class_ - ? self.highlight[hl].selector : "[dactyl|highlight~=" + hl + "]")); - }, + selector: function (class_) + let (self = this) + class_.replace(/(^|\s)([A-Z]\w+)\b/g, + function (m, n1, hl) n1 + + (self.highlight[hl] && self.highlight[hl].class != class_ + ? self.highlight[hl].selector : "[dactyl|highlight~=" + hl + "]")), /** * Clears all highlighting rules. Rules with default values are @@ -185,7 +183,7 @@ const Highlights = Module("Highlight", { * Bulk loads new CSS rules, in the format of, * * Rules ::= Rule | Rule "\n" Rule - * Rule ::= Bang? Star? MatchSpec Space Space* Css + * Rule ::= Bang? Star? MatchSpec Space Space+ Css * | Comment * Comment ::= Space* "//" * * Bang ::= "!" |