fix eslint warnigs for core project (#7506)

This commit is contained in:
Denys Vuika
2022-02-17 14:35:33 +00:00
committed by GitHub
parent 5b7f255eec
commit bca5a783ab
246 changed files with 5127 additions and 5065 deletions

View File

@@ -29,6 +29,7 @@ export class HighlightTransformService {
/**
* Searches for `search` string(s) within `text` and highlights all occurrences.
*
* @param text Text to search within
* @param search Text pattern to search for
* @param wrapperClass CSS class used to provide highlighting style
@@ -40,9 +41,7 @@ export class HighlightTransformService {
if (search && text) {
let pattern = search.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
pattern = pattern.split(' ').filter((t) => {
return t.length > 0;
}).join('|');
pattern = pattern.split(' ').filter((t) => t.length > 0).join('|');
const regex = new RegExp(pattern, 'gi');
result = text.replace(/<[^>]+>/g, '').replace(regex, (match) => {