1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 07:27:58 +01:00

add basic CSS highlighting to :hi, and fixed some small visual glitches

This commit is contained in:
Martin Stubenschrott
2008-11-01 14:35:08 +00:00
parent 2b3ef469c4
commit dd7178dfc6
2 changed files with 9 additions and 9 deletions

View File

@@ -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 += <span class="hl-Filter">{str.substr(i, filter.length)}</span>;
start = i + filter.length;