1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-12 00:25:46 +01:00

Better dactyl: charset handling. Fix some option completion issues.

This commit is contained in:
Kris Maglione
2011-05-04 15:40:16 -04:00
parent 6b5be697ae
commit db0ffa989c
5 changed files with 8 additions and 11 deletions

View File

@@ -969,7 +969,7 @@ var Commands = Module("commands", {
util.assert(!error, error);
// if we add the argument to an option after a space, it MUST not be empty
if (sep != "=" && !quote && arg.length == 0)
if (sep != "=" && !quote && arg.length == 0 && !complete)
arg = null;
count++; // to compensate the "=" character

View File

@@ -254,7 +254,7 @@ var Styles = Module("Styles", {
services["dactyl:"].providers["style"] = function styleProvider(uri) {
let id = /^\/(\d*)/.exec(uri.path)[1];
if (set.has(styles.allSheets, id))
return ["text/css", unescape(encodeURI(styles.allSheets[id].fullCSS))];
return ["text/css", styles.allSheets[id].fullCSS];
return null;
};
},

View File

@@ -974,11 +974,11 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
.map(function (node) "//" + node).join(" | ");
},
makeDTD: function makeDTD(obj) unescape(encodeURI(iter(obj)
makeDTD: function makeDTD(obj) iter(obj)
.map(function ([k, v]) ["<!ENTITY ", k, " '", String.replace(v == null ? "null" : v, /['%]/g,
function (m) ({ "'": "&apos;", "%": "&#x25;" })[m]),
"'>"].join(""))
.join("\n"))),
.join("\n"),
map: deprecated("iter.map", function map(obj, fn, self) iter(obj).map(fn, self).toArray()),
writeToClipboard: deprecated("dactyl.clipboardWrite", function writeToClipboard(str, verbose) util.dactyl.clipboardWrite(str, verbose)),