Skip to content

Commit

Permalink
include special characters in hashtag remover
Browse files Browse the repository at this point in the history
  • Loading branch information
vaaski committed Mar 15, 2024
1 parent bc9d4cd commit 0b270e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/textutil.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const removeHashtagsMentions = (text?: string) => {
if (!text) return

return text.replaceAll(/[#@][\w0-\\]+/g, "").trim()
return text.replaceAll(/[#@]\S+/g, "").trim()
}

0 comments on commit 0b270e4

Please sign in to comment.