diff --git a/common/content/commands.js b/common/content/commands.js index 91c0bf86..9e5f60fc 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -654,7 +654,7 @@ const Commands = Module("commands", { outer: while (i < str.length || complete) { var argStart = i; - let re = /^\s*/gy; + let re = /\s*/gy; re.lastIndex = i; i += re.exec(str)[0].length; @@ -764,7 +764,7 @@ const Commands = Module("commands", { if (complete) args.completeArg = args.length; - let re = /^(?:\s*(?=\n)|\s*)([^]*)/gy; + let re = /(?:\s*(?=\n)|\s*)([^]*)/gy; re.lastIndex = argStart || 0; sub = re.exec(str)[1]; diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 23ee4dc1..fbb4a8cf 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -493,6 +493,11 @@ const Dactyl = Module("dactyl", { this.helpInitialized = true; } }, + stringifyXML: function (xml) { + XML.prettyPrinting = false; + XML.ignoreWhitespace = false; + return UTF8(xml.toXMLString()); + }, exportHelp: function (path) { const FILE = io.File(path);