Skip to content

fix(web): 支持 Markdown 内联 HTML 标签渲染(如表格内 <br> 换行) - #42

Merged
tyanxie merged 1 commit into
mainfrom
fix/markdown-br-support
Aug 9, 2026
Merged

fix(web): 支持 Markdown 内联 HTML 标签渲染(如表格内 <br> 换行)#42
tyanxie merged 1 commit into
mainfrom
fix/markdown-br-support

Conversation

@tyanxie

@tyanxie tyanxie commented Aug 9, 2026

Copy link
Copy Markdown
Owner

添加 rehype-raw + rehype-sanitize 插件:

  • rehype-raw 解析 Markdown 中的原始 HTML 为 AST 节点
  • rehype-sanitize 基于 GitHub 默认白名单过滤,防止 XSS
  • 扩展 schema 允许 code 元素上的 language-* 类名(供 rehype-highlight 识别语言)

添加 rehype-raw + rehype-sanitize 插件:
- rehype-raw 解析 Markdown 中的原始 HTML 为 AST 节点
- rehype-sanitize 基于 GitHub 默认白名单过滤,防止 XSS
- 扩展 schema 允许 code 元素上的 language-* 类名(供 rehype-highlight 识别语言)
@tyanxie
tyanxie merged commit 5c04726 into main Aug 9, 2026
1 check passed
@tyanxie
tyanxie deleted the fix/markdown-br-support branch August 9, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant