-
Notifications
You must be signed in to change notification settings - Fork 13
feat(chat-messages): add support for syntax highlighting, copying and downloading csv to markdown renderer #1158
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
base: main
Are you sure you want to change the base?
Conversation
27e60f1 to
37bf9ef
Compare
📝 WalkthroughWalkthroughAdds a configurable, stateful markdown renderer and exports a new Sequence Diagram(s)sequenceDiagram
participant Component as SiMarkdownRendererComponent
participant Renderer as getMarkdownRenderer
participant Parser as Markdown Parser
participant Cache as Placeholder/Cache Manager
participant Highlighter as SyntaxHighlighter
participant Math as LaTeX Renderer
participant DOM as Host Container
Component->>Renderer: request render(text, options)
Renderer->>Parser: parse markdown -> tokens
Parser-->>Renderer: tokens (code, table, latex, inline, links)
alt code block
Renderer->>Highlighter: highlight(code, language)
Highlighter-->>Renderer: highlighted HTML or undefined
Renderer->>Cache: store code placeholder (metadata)
end
alt table
Renderer->>Cache: store table CSV and placeholder
end
alt LaTeX
Renderer->>Math: render(latex, displayMode)
Math-->>Renderer: rendered HTML or undefined
Renderer->>Cache: store latex placeholder
end
Renderer->>Renderer: assemble sanitized HTML with placeholders
Renderer->>Cache: resolve placeholders -> DOM nodes (attach buttons/handlers)
Renderer->>DOM: return final HTMLElement
Component->>DOM: mount element
Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
37bf9ef to
061738b
Compare
061738b to
4b6ee7c
Compare
|
Documentation. Coverage Reports: |
518beed to
796a228
Compare
796a228 to
2fe3043
Compare
2fe3043 to
58a0c9f
Compare
58a0c9f to
d7323d9
Compare
d7323d9 to
3585366
Compare
d52b6a6 to
f3d9198
Compare
a98658d to
6090746
Compare
…markdown renderer
…ulti-line formulas
6090746 to
22d2c16
Compare
New feature showcase:
This PR enhances the markdown renderer used in chat messages with interactive features, rendering options, theming, examples, and supporting changes.
Highlights
Backward compatibility