web-infra-dev / rspress

🦀💨 A fast Rspack-based static site generator.
https://rspress.dev
MIT License
1.19k stars 108 forks source link

[Bug]: Image resources in mdx cannot be processed when img is wrapped by div #1146

Open 9aoy opened 3 weeks ago

9aoy commented 3 weeks ago

Version

System:
    OS: macOS 12.5.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 193.67 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Browsers:
    Chrome: 125.0.6422.141
    Safari: 15.6.1
  npmPackages:
    @rspress/plugin-rss: 1.22.0 => 1.22.0 
    rspress: 1.22.0 => 1.22.0

Details

Add the following code to the mdx file:

<div>
  <img src="./assets/icon.png" />
</div>

expect

image

actual

image

Reproduce link

none

Reproduce Steps

none

Timeless0911 commented 3 weeks ago

It's a mdx-rs issue, see https://github.com/web-infra-dev/mdx-rs/issues/47#issue-2333062549