mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-12 01:55:45 +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
|
||||
|
||||
@@ -234,8 +234,10 @@ const Template = Module("Template", {
|
||||
this.map(opts, function (opt)
|
||||
<tr>
|
||||
<td>
|
||||
<span style={opt.isDefault ? "" : "font-weight: bold"}>{opt.pre}{opt.name}</span><span>{opt.value}</span>
|
||||
{opt.isDefault || opt.default == null ? "" : <span class="extra-info"> (default: {opt.default})</span>}
|
||||
<div highlight="Message"
|
||||
><span style={opt.isDefault ? "" : "font-weight: bold"}>{opt.pre}{opt.name}</span><span>{opt.value}</span>{
|
||||
opt.isDefault || opt.default == null ? "" : <span class="extra-info"> (default: {opt.default})</span>
|
||||
}</div>
|
||||
</td>
|
||||
</tr>)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user