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