FIX: remove word boundary regex (\b) for search result highlights. (#9338)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
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"],
|
||||
@@ -10,11 +11,13 @@ export default Component.extend({
|
||||
const term = this._searchTerm();
|
||||
|
||||
if (term) {
|
||||
$(
|
||||
this.element.querySelector(".site-text-id, .site-text-value")
|
||||
).highlight(term, {
|
||||
className: "text-highlight"
|
||||
});
|
||||
highlightHTML(
|
||||
this.element.querySelector(".site-text-id, .site-text-value"),
|
||||
term,
|
||||
{
|
||||
className: "text-highlight"
|
||||
}
|
||||
);
|
||||
}
|
||||
$(this.element.querySelector(".site-text-value")).ellipsis();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user