Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The icon and img tags under features will be recognized as strings #1582

Closed
slowlyo opened this issue Nov 16, 2024 · 1 comment · Fixed by #1600
Closed

[Bug]: The icon and img tags under features will be recognized as strings #1582

slowlyo opened this issue Nov 16, 2024 · 1 comment · Fixed by #1600
Assignees
Labels
🐞 bug Something isn't working

Comments

@slowlyo
Copy link

slowlyo commented Nov 16, 2024

Version

System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
    Memory: 24.31 GB / 31.28 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  npmPackages:
    rspress: ^1.37.0 => 1.37.0

Details

问题描述

下面是我原来的内容:

features:
  - title: xxx
    icon: <img src="logo.png" alt="Laravel Logo" />
    details: xxx

这段内容在之前是可以正常渲染的, 今天在使用 github actions 自动部署之后, 我发现原本正常显示的图标显示成了字符串

翻看了一下源码, 发现是 <img /> 标签没有被认定为 html 标签, 导致被渲染成了字符串

参照现在的代码逻辑, 我需要将内容替换为下面的形式, 来实现它应有的效果:

features:
  - title: xxx
    icon: <div><img src="logo.png" alt="Laravel Logo" /></div>
    details: xxx

产生问题的原因

翻看了一下对应文件的更新记录, 发现这个问题来自一次 PR:

fix: render inline markdown with generic syntax (#1557)

对应的文件更改

Reproduce link

null

Reproduce Steps

null

@slowlyo slowlyo added the 🐞 bug Something isn't working label Nov 16, 2024
@slowlyo
Copy link
Author

slowlyo commented Nov 16, 2024

be like:

Image

@Timeless0911 Timeless0911 changed the title [Bug]: features下的icon, img 标签会被认定为字符串 [Bug]: The icon and img tags under features will be recognized as strings Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants