From dba38707736bc4b3c99736457c5ef107670505bd Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 17 Oct 2008 03:14:45 +0000 Subject: [PATCH] fix :jumps command --- content/template.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/content/template.js b/content/template.js index c39d06eb..295d0fd7 100644 --- a/content/template.js +++ b/content/template.js @@ -1,4 +1,3 @@ - const template = { add: function (a, b) a + b, join: function (c) function (a, b) a + c + b, @@ -40,11 +39,11 @@ const template = { // some objects like window.JSON or getBrowsers()._browsers need the try/catch try { - switch (arg == null ? "undefined" : typeof arg) - { - case "number": - return {arg}; - case "string": + switch (arg == null ? "undefined" : typeof arg) + { + case "number": + return {arg}; + case "string": if (processStrings) arg = <>{util.escapeString(arg)}; return {arg}; @@ -90,7 +89,7 @@ const template = { let i; while ((i = lcstr.indexOf(lcfilter, start)) > -1) { - XML.ignoreWhitespace = false; + XML.ignoreWhitespace = false; s += <>{str.substring(start, i)}; s += {str.substr(i, filter.length)}; start = i + filter.length; @@ -148,7 +147,7 @@ const template = { jumptitleURI { - this.map(elems, function (idx, val) + this.map(Iterator(elems), function ([idx, val]) {idx == index ? ">" : ""} {Math.abs(idx - index)} @@ -235,3 +234,4 @@ const template = { } }; +// vim: set fdm=marker sw=4 ts=4 et: