feat: support underscores in hashtags

This commit is contained in:
codytseng
2025-04-07 17:50:56 +08:00
parent ccbce0e317
commit 2e552c356c

View File

@@ -15,7 +15,7 @@ export function EmbeddedHashtag({ hashtag }: { hashtag: string }) {
}
export const embeddedHashtagRenderer: TEmbeddedRenderer = {
regex: /#([\p{L}\p{N}\p{M}]+)/gu,
regex: /#([\p{L}\p{N}\p{M}_]+)/gu,
render: (hashtag: string, index: number) => {
return <EmbeddedHashtag key={`hashtag-${index}-${hashtag}`} hashtag={hashtag} />
}