|
|
@@ -64,7 +64,7 @@ class LegacyRevisionRenderer extends React.PureComponent {
|
|
|
*/
|
|
|
getHighlightedBody(body, keywords) {
|
|
|
const normalizedKeywordsArray = [];
|
|
|
- // !!TODO!!: add test code
|
|
|
+ // !!TODO!!: add test code refs: https://redmine.weseek.co.jp/issues/86841
|
|
|
// Separate keywords
|
|
|
// - Surrounded by double quotation
|
|
|
// - Split by both full-width and half-width spaces
|
|
|
@@ -84,6 +84,7 @@ class LegacyRevisionRenderer extends React.PureComponent {
|
|
|
|
|
|
// for non-chrome browsers compatibility
|
|
|
try {
|
|
|
+ // eslint-disable-next-line regex/invalid
|
|
|
keywordRegexp2 = new RegExp(`(?<!<)${normalizedKeywords}(?!(.*?("|>)))`, 'ig'); // inferior (this doesn't work well when html tags exist a lot) https://regex101.com/r/Dfi61F/1
|
|
|
}
|
|
|
catch (err) {
|