mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 18:02:27 +01:00
fix typo in parseArgs#quoteArg
This commit is contained in:
@@ -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, "\\$&");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user