feat(markdown-renderer): add optional LaTeX rendering support#1816
Draft
Killusions wants to merge 3 commits intomainfrom
Draft
feat(markdown-renderer): add optional LaTeX rendering support#1816Killusions wants to merge 3 commits intomainfrom
Killusions wants to merge 3 commits intomainfrom
Conversation
Add max-inline-size constraint to message bubble and wrapper to prevent overflow. Fix attachment preview backdrop click behavior. Use index-based tracking for message list and add scroll-to-bottom on message send. Update example action labels for clarity.
…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. Improve 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 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
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces LaTeX mathematical expression support to the markdown renderer using KaTeX. Key changes include a significant refactor of the getMarkdownRenderer utility to support SSR via DOCUMENT and PLATFORM_ID injection, the implementation of an LRU caching strategy for rendered elements (code blocks, tables, and LaTeX), and the addition of a latexRenderer input to the SiMarkdownRendererComponent. Furthermore, the PR includes updated SCSS styles for improved code block and table presentation, new helper functions for style-preserving HTML sanitization, and comprehensive unit test updates. I have no feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge after #1810 and #1811
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
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: