1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-27 16:32:26 +01:00

Remove straggling String#quote usage.

String#quote is no more.

Fixes :mkvimruntime.
This commit is contained in:
Doug Kearns
2015-05-14 03:02:30 +10:00
parent a9a97704f3
commit 07ce319763
4 changed files with 6 additions and 7 deletions

View File

@@ -51,7 +51,7 @@ var Map = Class("Map", {
names: Class.Memoize(function () this._keys.map(k => DOM.Event.canonicalKeys(k))),
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("."),

View File

@@ -141,7 +141,7 @@ function require_(obj, name, from, targetName) {
return obj;
}
catch (e) {
defineModule.dump("loading " + String.quote(name + ".jsm") + "\n");
defineModule.dump("loading " + JSON.stringify(name + ".jsm") + "\n");
if (loaded.util)
util.reportError(e);
else
@@ -291,9 +291,9 @@ function* properties(obj, prototypes) {
}
catch (e) {
util.reportError("Filtering properties for " +
String.quote(obj) + ", " +
JSON.stringify(obj) + ", " +
"error checking presence of " +
String.quote(prop) + ": " + e);
JSON.stringify(prop) + ": " + e);
}
return false;
};

View File

@@ -868,7 +868,7 @@ unlet s:cpo_save
Ary(o.names for (o of options) if (o.type != "boolean")).flatten()),
toggleoptions: wrap("let s:toggleOptions = [",
Ary(o.realNames for (o of options) if (o.type == "boolean"))
.flatten().map(String.quote),
.flatten().map(JSON.stringify),
", ") + "]"
}; //}}}

View File

@@ -390,7 +390,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
let quote = util.identity;
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"))
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
* is delimited by *delimiter* or " if *delimiter* is not specified.
* {@see String#quote}.
*
* @param {string} str
* @param {string} delimiter