Browse Source

feat: support underscores in hashtags

imwald
codytseng 11 months ago
parent
commit
2e552c356c
  1. 2
      src/components/Embedded/EmbeddedHashtag.tsx

2
src/components/Embedded/EmbeddedHashtag.tsx

@ -15,7 +15,7 @@ export function EmbeddedHashtag({ hashtag }: { hashtag: string }) { @@ -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} />
}

Loading…
Cancel
Save