diff --git a/src/components/Note/MarkdownArticle/preprocessMarkup.ts b/src/components/Note/MarkdownArticle/preprocessMarkup.ts index c5329fa..0ffa55a 100644 --- a/src/components/Note/MarkdownArticle/preprocessMarkup.ts +++ b/src/components/Note/MarkdownArticle/preprocessMarkup.ts @@ -66,10 +66,16 @@ export function preprocessMarkdownMediaLinks(content: string): string { } } - // Check if it's a media URL + // Check if it's a media URL or YouTube URL const isImageUrl = isImage(url) const isVideoUrl = isVideo(url) const isAudioUrl = isAudio(url) + const isYouTube = isYouTubeUrl(url) + + // Skip YouTube URLs - they should be left as plain text so they can be detected and rendered as YouTube embeds + if (isYouTube) { + continue + } let replacement: string if (isImageUrl || isVideoUrl || isAudioUrl) {