From a0fc10efbc01bba49d187788b66e8345713a1f63 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 11 Oct 2010 14:05:10 -0400 Subject: [PATCH] Fix command parsing on FF36. Closes issue #65. --HG-- extra : rebase_source : 801de24c1af70280c1ac297a2db47fc37b82878c --- common/content/commands.js | 4 ++-- common/content/dactyl.js | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) 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);