qlu-20-ui-library 1.7.48 → 1.7.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build/qlu-20-ui-library.cjs +27 -27
- package/dist/build/qlu-20-ui-library.js +337 -333
- package/dist/types/utils.js +2 -2
- package/package.json +1 -1
package/dist/types/utils.js
CHANGED
|
@@ -1203,7 +1203,7 @@ const findSlopWords = (segment, phrases, context, slop = 5) => {
|
|
|
1203
1203
|
.replace(/\//g, " ");
|
|
1204
1204
|
// First check for exact phrase matches
|
|
1205
1205
|
phrases.forEach((phrase) => {
|
|
1206
|
-
const wordBoundaryRegex = new RegExp(`\\b${phrase.toLowerCase()}\\b`);
|
|
1206
|
+
const wordBoundaryRegex = new RegExp(`\\b${escapeRegExp(phrase.toLowerCase())}\\b`);
|
|
1207
1207
|
if (wordBoundaryRegex.test(cleanSegment)) {
|
|
1208
1208
|
wordsToHighlight.add(phrase.toLowerCase());
|
|
1209
1209
|
}
|
|
@@ -1369,7 +1369,7 @@ const findMatchingPhrases = (word, phrases, context) => {
|
|
|
1369
1369
|
return phraseWords.every((phraseWord, idx) => {
|
|
1370
1370
|
if (idx === wordIndex)
|
|
1371
1371
|
return true; // Skip current word
|
|
1372
|
-
const wordBoundaryRegex = new RegExp(`\\b${phraseWord}\\b`);
|
|
1372
|
+
const wordBoundaryRegex = new RegExp(`\\b${escapeRegExp(phraseWord)}\\b`);
|
|
1373
1373
|
return wordBoundaryRegex.test(contextLower);
|
|
1374
1374
|
});
|
|
1375
1375
|
})
|