[Glitch] Hashtag fixes

Port b01d21c4d4 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Claire
2025-10-28 15:26:08 +01:00
parent 12c487cc3e
commit 48f2597a36

View File

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