1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-10 01:25:46 +01:00

Hello strange new syntax. Can we be friends?

This commit is contained in:
Kris Maglione
2013-08-21 22:55:55 -07:00
parent e5864bfd23
commit c89f3e0df5
21 changed files with 106 additions and 134 deletions

View File

@@ -218,11 +218,12 @@ var Highlights = Module("Highlight", {
* @param {string} class
*/
selector: function selector(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 + "]")),
class_.replace(/(^|[>\s])([A-Z][\w-]+)\b/g,
(m, n1, hl) => {
if (this.highlight[hl] && this.highlight[hl].class != class_)
return n1 + this.highlight[hl].selector;
return n1 + "[dactyl|highlight~=" + hl + "]";
}),
groupRegexp: util.regexp(literal(/*
^