1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-17 07:15:46 +01:00

Wrap long option values in :set output. Closes issue #84.

--HG--
extra : rebase_source : b6346cff93828af6c22b19bbd65ac5cf20b7e72d
This commit is contained in:
Kris Maglione
2010-10-14 13:06:35 -04:00
parent 450a24340e
commit a09f6321e7
4 changed files with 12 additions and 11 deletions

View File

@@ -147,13 +147,11 @@ const Highlights = Module("Highlight", {
*
* @param {string} class
*/
selector: function (class_) {
let [, hl, rest] = class_.match(/^(\w*)(.*)/);
let pattern = "[dactyl|highlight~=" + hl + "]";
if (this.highlight[hl] && this.highlight[hl].class != class_)
pattern = this.highlight[hl].selector;
return pattern + rest;
},
selector: function (class_)
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 + "]")),
/**
* Clears all highlighting rules. Rules with default values are