mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-07 14:24:17 +01:00
Remove straggling String#quote usage.
String#quote is no more. Fixes :mkvimruntime.
This commit is contained in:
@@ -51,7 +51,7 @@ var Map = Class("Map", {
|
|||||||
names: Class.Memoize(function () this._keys.map(k => DOM.Event.canonicalKeys(k))),
|
names: Class.Memoize(function () this._keys.map(k => DOM.Event.canonicalKeys(k))),
|
||||||
|
|
||||||
get toStringParams() [this.modes.map(m => m.name),
|
get toStringParams() [this.modes.map(m => m.name),
|
||||||
this.names.map(String.quote)],
|
this.names.map(JSON.stringify)],
|
||||||
|
|
||||||
get identifier() [this.modes[0].name, this.hive.prefix + this.names[0]].join("."),
|
get identifier() [this.modes[0].name, this.hive.prefix + this.names[0]].join("."),
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ function require_(obj, name, from, targetName) {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
defineModule.dump("loading " + String.quote(name + ".jsm") + "\n");
|
defineModule.dump("loading " + JSON.stringify(name + ".jsm") + "\n");
|
||||||
if (loaded.util)
|
if (loaded.util)
|
||||||
util.reportError(e);
|
util.reportError(e);
|
||||||
else
|
else
|
||||||
@@ -291,9 +291,9 @@ function* properties(obj, prototypes) {
|
|||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
util.reportError("Filtering properties for " +
|
util.reportError("Filtering properties for " +
|
||||||
String.quote(obj) + ", " +
|
JSON.stringify(obj) + ", " +
|
||||||
"error checking presence of " +
|
"error checking presence of " +
|
||||||
String.quote(prop) + ": " + e);
|
JSON.stringify(prop) + ": " + e);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -868,7 +868,7 @@ unlet s:cpo_save
|
|||||||
Ary(o.names for (o of options) if (o.type != "boolean")).flatten()),
|
Ary(o.names for (o of options) if (o.type != "boolean")).flatten()),
|
||||||
toggleoptions: wrap("let s:toggleOptions = [",
|
toggleoptions: wrap("let s:toggleOptions = [",
|
||||||
Ary(o.realNames for (o of options) if (o.type == "boolean"))
|
Ary(o.realNames for (o of options) if (o.type == "boolean"))
|
||||||
.flatten().map(String.quote),
|
.flatten().map(JSON.stringify),
|
||||||
", ") + "]"
|
", ") + "]"
|
||||||
}; //}}}
|
}; //}}}
|
||||||
|
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
|||||||
|
|
||||||
let quote = util.identity;
|
let quote = util.identity;
|
||||||
if (flags.has("q"))
|
if (flags.has("q"))
|
||||||
quote = function quote(obj) typeof obj === "number" ? obj : String.quote(obj);
|
quote = function quote(obj) typeof obj === "number" ? obj : JSON.stringify(obj);
|
||||||
if (flags.has("e"))
|
if (flags.has("e"))
|
||||||
quote = function quote(obj) "";
|
quote = function quote(obj) "";
|
||||||
|
|
||||||
@@ -596,7 +596,6 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
|||||||
/**
|
/**
|
||||||
* Escapes quotes, newline and tab characters in *str*. The returned string
|
* Escapes quotes, newline and tab characters in *str*. The returned string
|
||||||
* is delimited by *delimiter* or " if *delimiter* is not specified.
|
* is delimited by *delimiter* or " if *delimiter* is not specified.
|
||||||
* {@see String#quote}.
|
|
||||||
*
|
*
|
||||||
* @param {string} str
|
* @param {string} str
|
||||||
* @param {string} delimiter
|
* @param {string} delimiter
|
||||||
|
|||||||
Reference in New Issue
Block a user