Skip to content

feat: add remark-based markdown sanitizer to fix code block nesting issues#9

Open
zhcsyncer wants to merge 1 commit intomainfrom
fix-markdown-nesting
Open

feat: add remark-based markdown sanitizer to fix code block nesting issues#9
zhcsyncer wants to merge 1 commit intomainfrom
fix-markdown-nesting

Conversation

@zhcsyncer
Copy link
Copy Markdown
Owner

Summary

  • 新增基于 remark 的 markdown 清理器,修复代码块嵌套渲染问题
  • 使用 unified + remark-parse + remark-stringify 处理 markdown
  • 将 ``` 转换为 ~~~ 避免嵌套冲突,确保代码块正确渲染

Changes

  • client/src/composables/useMarkdownSanitizer.ts - 新增 sanitizer composable
  • client/src/components/PlanViewer.vue - 渲染前调用 sanitizer 处理 markdown
  • client/package.json - 添加 unified/remark 依赖

Test plan

  • 验证包含嵌套代码块的 plan 文件能正确渲染
  • 验证普通 markdown 内容渲染不受影响

🤖 Generated with Claude Code

…ssues

- Add useMarkdownSanitizer composable using unified/remark
- Convert ``` to ~~~ to avoid nesting conflicts
- Ensure proper spacing around code blocks
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