1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-05 20:34:11 +01:00

Decode URLs in the completion list against my better judgment. Get rid of bloody newlines in strict mode lambdas.

This commit is contained in:
Kris Maglione
2011-08-14 13:09:51 -04:00
parent 7c61244e5a
commit 9273db48ab
5 changed files with 11 additions and 8 deletions

View File

@@ -273,11 +273,11 @@ var Template = Module("Template", {
case "boolean":
return <span highlight="Boolean">{str}</span>;
case "function":
// Vim generally doesn't like /foo*/, because */ looks like a comment terminator.
// Using /foo*(:?)/ instead.
str = str.replace("/* use strict */ \n", "/* use strict */ ");
if (processStrings)
return <span highlight="Function">{str.replace(/\{(.|\n)*(?:)/g, "{ ... }")}</span>;
<>}</>; /* Vim */
arg = String(arg).replace("/* use strict */ \n", "/* use strict */ ");
return <>{arg}</>;
case "undefined":
return <span highlight="Null">{arg}</span>;
@@ -302,7 +302,10 @@ var Template = Module("Template", {
}
},
highlightFilter: function highlightFilter(str, filter, highlight) {
highlightFilter: function highlightFilter(str, filter, highlight, isURI) {
if (isURI)
str = util.losslessDecodeURI(str);
return this.highlightSubstrings(str, (function () {
if (filter.length == 0)
return;