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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user