mirror of
https://github.com/badlogic/heissepreise.git
synced 2024-06-04 15:55:30 +02:00
Fix highlighting regex for Safari < 16.3.
This commit is contained in:
parent
7b97b0f712
commit
651b15d4ff
|
@ -213,7 +213,7 @@ class ItemsList extends View {
|
|||
for (let i = 0; i < keywords.length; i++) {
|
||||
const string = keywords[i];
|
||||
// check if keyword is not preceded by a < or </
|
||||
const regex = new RegExp(`(?<!<\/?)${string}`, "gi");
|
||||
const regex = new RegExp(`<(?!\/?)(${string})`, "gi");
|
||||
highlightedName = highlightedName.replace(regex, "<strong>$&</strong>");
|
||||
}
|
||||
return `${highlightedName}`;
|
||||
|
|
Loading…
Reference in New Issue
Block a user