From 632468911b21d093533a379042ed2f3a3b5ca417 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sat, 20 May 2023 01:29:17 +0100 Subject: [PATCH] fix: disable custom link embedding --- src/markdown/rehype-embed.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/markdown/rehype-embed.ts b/src/markdown/rehype-embed.ts index 3bc39d9b..f23604a0 100644 --- a/src/markdown/rehype-embed.ts +++ b/src/markdown/rehype-embed.ts @@ -20,7 +20,8 @@ export const rehypeEmbed: Plugin< !parent || !("tagName" in parent) || parent.tagName !== "p" || - parent.children.length > 1 + parent.children.length > 1 || + (node.children?.[0] as any)?.value !== node.properties?.href ) return