diff --git a/content/style.js b/content/style.js index 7064aacc..5d1ad72f 100644 --- a/content/style.js +++ b/content/style.js @@ -19,11 +19,11 @@ function Highlights(name, store, serial) String color: green; Normal color: black; background: white; - ErrorMsg color: white; background: red; + ErrorMsg color: white; background: red; font-weight: bold; InfoMsg color: black; background: white; ModeMsg color: black; background: white; MoreMsg color: green; background: white; - WarningMsg color: red; background: white; + WarningMsg color: red; background: white; Message white-space: normal; min-width: 100%; padding-left: 2em; text-indent: -2em; display: block; Filter font-weight: bold; @@ -58,7 +58,7 @@ function Highlights(name, store, serial) z-index: 5000; font-family: monospace; font-size: 10px; - font-weight: bold; + font-weight: bold; color: white; background-color: red; border-color: ButtonShadow; @@ -478,8 +478,6 @@ liberator.registerObserver("load_commands", function () ; display: inline-block !important; position: static !important; - width: 3em !important; min-width: 3em !important; max-width: 3em !important; - height: 1em !important; min-height: 1em !important; max-height: 1em !important; margin: 0px !important; padding: 0px !important; overflow: hidden !important; ]]>; @@ -490,10 +488,11 @@ liberator.registerObserver("load_commands", function () let str = template.tabular(["Key", "Sample", "CSS"], ["padding: 0 1em 0 0; vertical-align: top"], ([h.class, - XXX, - h.value] + XXX, + template.maybeXML(h.value.replace(/\s+/g, "\u00a0") + .replace(/\b([-\w]+):/g, "$1:"))] for (h in highlight) - if (!key || h.class.indexOf(key) > -1))); + if (!key || h.class.indexOf(key) > -1))); commandline.echo(str, commandline.HL_NORMAL, commandline.FORCE_MULTILINE); return; } diff --git a/content/template.js b/content/template.js index 4bb585e1..abea429c 100644 --- a/content/template.js +++ b/content/template.js @@ -81,6 +81,7 @@ const template = { return str; if (str == "") return <>{str}; + let lcstr = String(str).toLowerCase(); let lcfilter = filter.toLowerCase(); str = String(str).replace(" ", "\u00a0"); @@ -89,7 +90,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;