Feat: block math katex support#995
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR adds KaTeX-based math rendering to markdown previews and updates a set of feature imports to use renamed *Store modules.
Changes:
- Enable math parsing/rendering in
MarkdownPreviewviaremark-math+rehype-katex(and KaTeX CSS). - Add CSS to allow horizontal scrolling for block math (
.katex-display) in key viewer contexts. - Update various imports to use
progressbarStore,toolbarStore, andpageEditorStoremodule paths; add an e2e test for block math rendering.
Reviewed changes
Copilot reviewed 25 out of 30 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/leafwiki-ui/src/index.css | Adds overflow handling for KaTeX block math containers. |
| ui/leafwiki-ui/src/features/preview/MarkdownPreview.tsx | Adds remark/rehype plugins to render math with KaTeX and imports KaTeX CSS. |
| ui/leafwiki-ui/package.json | Adds dependencies for KaTeX + remark/rehype math integration. |
| e2e/tests/page.spec.ts | Adds an e2e test asserting block math renders via KaTeX. |
| ui/leafwiki-ui/src/features/** | Updates imports to renamed *Store modules (toolbar/progressbar/pageEditor/refactor dialogs). |
Files not reviewed (1)
- ui/leafwiki-ui/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
Hi @hfhongzy, thx for your implementation of katex support. I really appreciated your PR. I will take a look and test it until monday. Thanks! |
perber
force-pushed
the
feat/block-math-katex
branch
from
May 20, 2026 18:28
ca08b6b to
aa934ff
Compare
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.
Support block math in preview with KaTeX