Skip to content
This repository was archived by the owner on Oct 10, 2024. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/words.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const words = async (message: Message) => {
// Utility function for removing special characters
function stripSpecialCharacters(str: string) {
// match special symbols and replace with ' '
str = str.replace(/[.,/#!$%?&*;:{}=\-_'"~()]/g, ' ');
str = str.replace(/[.,/#!$%?&*;:{}=\-_'"“”~()]/g, ' ');
Copy link
Member

@Vyvy-vi Vyvy-vi Mar 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM-!

// match double whitespace with single space for cleaner string
return str.replace(/\s{2,}/g, ' ');
}