Improved search highlighting

pull/212/head
M66B 2 years ago
parent 8225639a6f
commit ba611dd78c

@ -3002,7 +3002,9 @@ public class HtmlHelper {
span.attr("style"), span.attr("style"),
"font-size:larger; background-color:" + encodeWebColor(color) "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); holder.appendChild(span);
prev = end; prev = end;

Loading…
Cancel
Save