address comment
This commit is contained in:
parent
9f3057da6a
commit
1e47805303
|
|
@ -75,7 +75,7 @@ export function cacheNormalizedWhitespaces() {
|
|||
|
||||
export function normalizeWhiteSpace(text: string): string {
|
||||
let result = normalizedWhitespaceCache?.get(text);
|
||||
if (!result) {
|
||||
if (result === undefined) {
|
||||
result = text.replace(/\u200b/g, '').trim().replace(/\s+/g, ' ');
|
||||
normalizedWhitespaceCache?.set(text, result);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue