From 7139211fa16e2a33657f5e6be46fef77c720dc74 Mon Sep 17 00:00:00 2001 From: codytseng Date: Sun, 9 Nov 2025 16:32:52 +0800 Subject: [PATCH] fix: prioritize mention and embedded event parsing --- src/components/Content/index.tsx | 4 ++-- src/components/ContentPreview/Content.tsx | 2 +- src/components/ProfileAbout/index.tsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Content/index.tsx b/src/components/Content/index.tsx index 3769d857..d74f37e1 100644 --- a/src/components/Content/index.tsx +++ b/src/components/Content/index.tsx @@ -47,11 +47,11 @@ export default function Content({ if (!_content) return {} const nodes = parseContent(_content, [ + EmbeddedEventParser, + EmbeddedMentionParser, EmbeddedUrlParser, EmbeddedLNInvoiceParser, EmbeddedWebsocketUrlParser, - EmbeddedEventParser, - EmbeddedMentionParser, EmbeddedHashtagParser, EmbeddedEmojiParser ]) diff --git a/src/components/ContentPreview/Content.tsx b/src/components/ContentPreview/Content.tsx index f5517bd7..33221f94 100644 --- a/src/components/ContentPreview/Content.tsx +++ b/src/components/ContentPreview/Content.tsx @@ -24,9 +24,9 @@ export default function Content({ const { t } = useTranslation() const nodes = useMemo(() => { return parseContent(content, [ - EmbeddedUrlParser, EmbeddedEventParser, EmbeddedMentionParser, + EmbeddedUrlParser, EmbeddedEmojiParser ]) }, [content]) diff --git a/src/components/ProfileAbout/index.tsx b/src/components/ProfileAbout/index.tsx index 395fb3a9..2f733c6f 100644 --- a/src/components/ProfileAbout/index.tsx +++ b/src/components/ProfileAbout/index.tsx @@ -28,10 +28,10 @@ export default function ProfileAbout({ about, className }: { about?: string; cla if (!about) return null const nodes = parseContent(translatedAbout ?? about, [ + EmbeddedMentionParser, EmbeddedWebsocketUrlParser, EmbeddedUrlParser, - EmbeddedHashtagParser, - EmbeddedMentionParser + EmbeddedHashtagParser ]) return nodes.map((node, index) => { if (node.type === 'url') {