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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user