mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 11:18:00 +01:00
Fix something to do with <a>.
This commit is contained in:
7
common/content/commands.js
Executable file → Normal file
7
common/content/commands.js
Executable file → Normal file
@@ -506,13 +506,14 @@ function Commands() //{{{
|
||||
commandToString: function (args)
|
||||
{
|
||||
let res = [args.command + (args.bang ? "!" : "")];
|
||||
function quote(str) quoteArg[/\s/.test(str) ? '"' : ""](str);
|
||||
function quote(str) quoteArg[/[\s"'\\]|^$/.test(str) ? '"' : ""](str);
|
||||
|
||||
for (let [opt, val] in Iterator(args.options || {}))
|
||||
{
|
||||
res.push(opt);
|
||||
let char = /^-.$/.test(opt) ? " " : "=";
|
||||
if (val != null)
|
||||
res.push(quote(val));
|
||||
opt += char + quote(val)
|
||||
res.push(opt);
|
||||
}
|
||||
for (let [,arg] in Iterator(args.arguments || []))
|
||||
res.push(quote(arg));
|
||||
|
||||
Reference in New Issue
Block a user