mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
Merge branch 'master' of https://github.com/Fabio286/antares into new-tab-system
This commit is contained in:
@ -314,6 +314,8 @@ export default {
|
|||||||
this.changeBreadcrumbs(payload);
|
this.changeBreadcrumbs(payload);
|
||||||
},
|
},
|
||||||
highlightWord (string) {
|
highlightWord (string) {
|
||||||
|
string = string.replaceAll('<', '<').replaceAll('>', '>');
|
||||||
|
|
||||||
if (this.searchTerm) {
|
if (this.searchTerm) {
|
||||||
const regexp = new RegExp(`(${this.searchTerm.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')})`, 'gi');
|
const regexp = new RegExp(`(${this.searchTerm.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')})`, 'gi');
|
||||||
return string.replace(regexp, '<span class="text-primary">$1</span>');
|
return string.replace(regexp, '<span class="text-primary">$1</span>');
|
||||||
|
Reference in New Issue
Block a user