feat: support underscores in hashtags
This commit is contained in:
@@ -15,7 +15,7 @@ export function EmbeddedHashtag({ hashtag }: { hashtag: string }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const embeddedHashtagRenderer: TEmbeddedRenderer = {
|
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) => {
|
render: (hashtag: string, index: number) => {
|
||||||
return <EmbeddedHashtag key={`hashtag-${index}-${hashtag}`} hashtag={hashtag} />
|
return <EmbeddedHashtag key={`hashtag-${index}-${hashtag}`} hashtag={hashtag} />
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user