vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
12.65k stars 2.05k forks source link

The content of the markdown file cannot be displayed completely. #4194

Closed xxf24 closed 1 week ago

xxf24 commented 2 weeks ago

Describe the bug

Recently, after upgrading Vue to 3.5.x, I found that the iframe tags in markdown files may cause the content of the markdown files to be missing.

Here's a minimal replication: https://stackblitz.com/edit/vite-gggmth?file=docs%2Findex.md

Reproduction

# VitePress 💙 StackBlitz

Hi there :wave: This is a demo running VitePress within your **browser tab**!

<iframe width="560" height="315" src="https://www.youtube.com/embed/CJ9Ya4g-Nj8?si=uFxwopP_zoEOW-J6" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

## Powered by Vite

...other contents

Above is my markdown content, But after rendering, h1 section is missing.

image

Expected behavior

Even if the iframe fails to load, it doesn't affect the h1 section

image

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vitepress: latest => 1.3.4

Additional context

No response

Validations

brc-dd commented 1 week ago

This seems to be fixed now with latest vue?

I'm not sure but some fix in 3.5.5 resolved this.