feat: implement markdown renderer with micromark#1829
feat: implement markdown renderer with micromark#1829Killusions wants to merge 9 commits intomainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the SiMarkdownRendererComponent to use micromark for CommonMark-compliant parsing with GFM extensions, replacing the previous regex-based implementation. Key enhancements include support for LaTeX math rendering via KaTeX, syntax highlighting, and interactive features like copy-to-clipboard for code blocks and CSV downloads for tables. Feedback focuses on resolving potential hydration mismatches in SSR caused by non-deterministic IDs, improving the robustness of markdown preprocessing to avoid breaking code blocks, and strengthening the custom DOM sanitization logic. Additionally, the use of effect() for state propagation should be replaced with computed() or toSignal() to align with the repository's style guide.
2fa10fc to
707e712
Compare
97a4f36 to
ebbe63c
Compare
faadfc7 to
d9839a7
Compare
|
Now need to separate the new one from the existing Markdown renderer |
b1c4868 to
374799e
Compare
…line and caching - rewrite the markdown renderer to use a recursive processing pipeline with placeholder-based architecture - add SSR support via optional doc/isBrowser parameters - introduce LRU caching for code blocks and tables - iprove table rendering with proper thead/th support - add code-wrapper structure with language labels - update SCSS for new structural layout including code-wrapper, table-wrapper, and table-scroll-container
Add optional syntax highlighting the markdown renderer for libraries like highlight.js and a custom hljs theme using Element design tokens
Add optional latex rendering to the markdown renderer for rendering math expressions (common in AI chatbots), used to integrate libraries like katex Supports both inline ($...$) and display ($$...$$) math
…ming Add temporary closing marker logic that automatically completes unfinished code blocks during streaming (to make it more smooth)
374799e to
9fa0fe8
Compare

Rewrites + all new features using micromark:
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: