1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 17:42:27 +01:00

fix typo in parseArgs#quoteArg

This commit is contained in:
Doug Kearns
2008-10-19 08:01:09 +00:00
parent 19e4bcac3a
commit 9fc85871c8

View File

@@ -355,12 +355,12 @@ function Commands() //{{{
switch (quote) switch (quote)
{ {
case "'": case "'":
return function (str) "'" + str.substitute(/[\\']/g, "\\$&") + "'"; return function (str) "'" + str.replace(/[\\']/g, "\\$&") + "'";
case '"': case '"':
return function (str) '"' + str.substitute(/[\\"\t\n]/g, return function (str) '"' + str.replace(/[\\"\t\n]/g,
function (c) (c == "\n" ? "\\n" : c == "\t" ? "\\t" : "\\" + c)); function (c) (c == "\n" ? "\\n" : c == "\t" ? "\\t" : "\\" + c));
default: default:
return function (str) str.substitute(/[\\ ]/g, "\\$&"); return function (str) str.replace(/[\\ ]/g, "\\$&");
} }
} }