Improved search highlighting

This commit is contained in:
M66B
2023-01-24 21:56:13 +01:00
parent 8225639a6f
commit ba611dd78c

View File

@@ -3002,7 +3002,9 @@ public class HtmlHelper {
span.attr("style"),
"font-size:larger; background-color:" + encodeWebColor(color)
));
span.text(text.substring(start, end));
span.text(tnode.getWholeText().length() == text.length()
? tnode.getWholeText().substring(start, end)
: text.substring(start, end));
holder.appendChild(span);
prev = end;