mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -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();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user