Skip to content

Commit

Permalink
πŸ› [emv] replace special whitespaces with space
Browse files Browse the repository at this point in the history
(cherry picked from commit d52d4ca)
  • Loading branch information
jxn-30 committed Dec 5, 2023
1 parent 061f240 commit e0d4da0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ const getMissingRequirements = (
reqEl.querySelector<HTMLElement>('b')?.textContent?.trim() ?? '';
// all requirements as a continuous string
const reqText =
reqEl.textContent?.trim()?.replace(infoText, '').trim() ?? '';
reqEl.textContent
?.trim()
?.replace(infoText, '')
.trim()
.replace(/\s/gu, ' ') ?? '';
// raw: will not change, remaining: processed requirements will be removed
return { infoText, raw: reqText, remaining: reqText };
};
Expand Down

0 comments on commit e0d4da0

Please sign in to comment.