Browse Source

fix youtube embedded display

imwald
Silberengel 4 months ago
parent
commit
4108439d19
  1. 8
      src/components/Note/MarkdownArticle/preprocessMarkup.ts

8
src/components/Note/MarkdownArticle/preprocessMarkup.ts

@ -66,10 +66,16 @@ export function preprocessMarkdownMediaLinks(content: string): string { @@ -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) {

Loading…
Cancel
Save