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