mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-09 19:55:46 +01:00
Remove remaining comprehensions (Part 2).
This commit is contained in:
@@ -934,13 +934,18 @@ var Options = Module("options", {
|
|||||||
|
|
||||||
modules.cache.register("options.dtd",
|
modules.cache.register("options.dtd",
|
||||||
() => util.makeDTD(
|
() => util.makeDTD(
|
||||||
iter(([["option", o.name, "default"].join("."),
|
iter(function* () {
|
||||||
o.type === "string" ? o.defaultValue.replace(/'/g, "''") :
|
for (let o of self)
|
||||||
o.defaultValue === true ? "on" :
|
yield [["option", o.name, "default"].join("."),
|
||||||
o.defaultValue === false ? "off" : o.stringDefaultValue]
|
o.type === "string" ? o.defaultValue.replace(/'/g, "''") :
|
||||||
for (o of self)),
|
o.defaultValue === true ? "on" :
|
||||||
|
o.defaultValue === false ? "off" : o.stringDefaultValue];
|
||||||
|
}(),
|
||||||
|
|
||||||
([["option", o.name, "type"].join("."), o.type] for (o of self)),
|
function* () {
|
||||||
|
for (let o of self)
|
||||||
|
yield [["option", o.name, "type"].join("."), o.type];
|
||||||
|
}(),
|
||||||
|
|
||||||
config.dtd)),
|
config.dtd)),
|
||||||
true);
|
true);
|
||||||
@@ -1398,7 +1403,10 @@ var Options = Module("options", {
|
|||||||
|
|
||||||
// Fill in the current values if we're removing
|
// Fill in the current values if we're removing
|
||||||
if (opt.operator == "-" && isArray(opt.values)) {
|
if (opt.operator == "-" && isArray(opt.values)) {
|
||||||
let have = new RealSet(i.text for (i of context.allItems.items));
|
let have = new RealSet(function* () {
|
||||||
|
for (let i of context.allItems.items)
|
||||||
|
yield i.text;
|
||||||
|
}());
|
||||||
context = context.fork("current-values", 0);
|
context = context.fork("current-values", 0);
|
||||||
context.anchored = optcontext.anchored;
|
context.anchored = optcontext.anchored;
|
||||||
context.maxItems = optcontext.maxItems;
|
context.maxItems = optcontext.maxItems;
|
||||||
|
|||||||
Reference in New Issue
Block a user