mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-04 22:44:12 +01:00
Serialize :hi -link.
This commit is contained in:
@@ -836,8 +836,11 @@ var Commands = Module("commands", {
|
||||
.toObject();
|
||||
|
||||
for (let [opt, val] in Iterator(args.options || {})) {
|
||||
if (val === undefined)
|
||||
continue;
|
||||
if (val != null && defaults[opt] === val)
|
||||
continue;
|
||||
|
||||
let chr = /^-.$/.test(opt) ? " " : "=";
|
||||
if (isArray(val))
|
||||
opt += chr + Option.stringify.stringlist(val);
|
||||
@@ -845,6 +848,7 @@ var Commands = Module("commands", {
|
||||
opt += chr + Commands.quote(val);
|
||||
res.push(opt);
|
||||
}
|
||||
|
||||
for (let [, arg] in Iterator(args.arguments || []))
|
||||
res.push(Commands.quote(arg));
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ var Highlights = Module("Highlight", {
|
||||
|
||||
let highlight = this.highlight[key] || this._create(false, [key]);
|
||||
|
||||
let bases = extend || highlight.extend;
|
||||
let bases = extend || highlight.extends;
|
||||
if (append) {
|
||||
newStyle = Styles.append(highlight.value || "", newStyle);
|
||||
bases = highlight.extends.concat(bases);
|
||||
@@ -405,7 +405,10 @@ var Highlights = Module("Highlight", {
|
||||
{
|
||||
command: this.name,
|
||||
arguments: [v.class],
|
||||
literalArg: v.value
|
||||
literalArg: v.value,
|
||||
options: {
|
||||
"-link": v.extends.length ? v.extends : undefined
|
||||
}
|
||||
}
|
||||
for (v in Iterator(highlight))
|
||||
if (v.value != v.defaultValue)
|
||||
|
||||
Reference in New Issue
Block a user