Revert "FIX: word boundary regex (\b) not working in Unicode languages. (#9163)"

Lookbehind regex is not supported in Firefox or IE11

This reverts commit 572bb5988f.
This commit is contained in:
David Taylor
2020-03-25 14:34:45 +00:00
parent 9521a88984
commit d62d258fe5
14 changed files with 171 additions and 175 deletions

View File

@@ -1,6 +1,5 @@
import Component from "@ember/component";
import { on } from "discourse-common/utils/decorators";
import highlightHTML from "discourse/lib/highlight-html";
export default Component.extend({
classNames: ["site-text"],
@@ -11,13 +10,11 @@ export default Component.extend({
const term = this._searchTerm();
if (term) {
highlightHTML(
this.element.querySelector(".site-text-id, .site-text-value"),
term,
{
className: "text-highlight"
}
);
$(
this.element.querySelector(".site-text-id, .site-text-value")
).highlight(term, {
className: "text-highlight"
});
}
$(this.element.querySelector(".site-text-value")).ellipsis();
},