Hashtag fixes (#36625)

This commit is contained in:
Claire 2025-10-28 15:26:08 +01:00 committed by GitHub
commit b01d21c4d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -26,7 +26,12 @@ export const HandledLink: FC<HandledLinkProps & ComponentProps<'a'>> = ({
...props
}) => {
// Handle hashtags
if (text.startsWith('#') || prevText?.endsWith('#')) {
if (
text.startsWith('#') ||
prevText?.endsWith('#') ||
text.startsWith('') ||
prevText?.endsWith('')
) {
const hashtag = text.slice(1).trim();
return (
<Link