Skip to content

Feat: block math katex support#995

Merged
perber merged 3 commits into
perber:mainfrom
hfhongzy:feat/block-math-katex
May 20, 2026
Merged

Feat: block math katex support#995
perber merged 3 commits into
perber:mainfrom
hfhongzy:feat/block-math-katex

Conversation

@hfhongzy

Copy link
Copy Markdown
Contributor

Support block math in preview with KaTeX

Copilot AI review requested due to automatic review settings May 16, 2026 06:56
@hfhongzy
hfhongzy requested a review from perber as a code owner May 16, 2026 06:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 MarkdownPreview via remark-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, and pageEditorStore module 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.

Comment thread ui/leafwiki-ui/src/features/preview/MarkdownPreview.tsx
Comment thread ui/leafwiki-ui/src/features/preview/MarkdownPreview.tsx
@perber

perber commented May 16, 2026

Copy link
Copy Markdown
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 perber added this to the v0.10.0 milestone May 17, 2026
@perber
perber force-pushed the feat/block-math-katex branch from ca08b6b to aa934ff Compare May 20, 2026 18:28
@perber
perber merged commit e8aaf98 into perber:main May 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants