Jinjing
|
e5f75564af
|
feat: add mermaid diagram rendering and code block copy button (#418)
* feat: add mermaid diagram rendering and code block copy button
- Add mermaid library for rendering mermaid diagrams in markdown preview
- Create MermaidBlock component for diagram rendering
- Create CodeBlockCopyButton component for copying code blocks
- Extract CSS into separate files for better organization
* fix: address review findings
- Sanitize mermaid SVG output with DOMPurify before innerHTML assignment
- Remove dead `initialized` flag in MermaidBlock
- Serialize concurrent mermaid.render() calls with a promise queue
- Add .catch() handlers for clipboard write promises
- Skip CodeBlockCopyButton wrapper for mermaid diagram blocks
|
2026-04-09 12:21:11 -07:00 |
|