Skip to content

fix(client): ignore nested katex tables for line highlights#2579

Merged
kermanx merged 2 commits into
slidevjs:mainfrom
cyphercodes:fix/latex-highlight-nested-katex
May 13, 2026
Merged

fix(client): ignore nested katex tables for line highlights#2579
kermanx merged 2 commits into
slidevjs:mainfrom
cyphercodes:fix/latex-highlight-nested-katex

Conversation

@cyphercodes
Copy link
Copy Markdown
Contributor

Summary

  • Fix KaTeX line highlighting so nested tables from matrices/substacks are not treated as top-level equation rows.
  • Move the row-collection logic into a small helper and add regression coverage for nested KaTeX tables.

Fixes #2559

Test plan

  • pnpm exec vitest run packages/client/builtin/KaTexBlockWrapper.test.ts packages/slidev/node/syntax/katex.test.ts
  • pnpm exec eslint packages/client/builtin/KaTexBlockWrapper.vue packages/client/builtin/katex-lines.ts packages/client/builtin/KaTexBlockWrapper.test.ts
  • pnpm exec tsc --noEmit --target ESNext --lib DOM,ESNext --module ESNext --moduleResolution bundler --strict --skipLibCheck --types vitest,node packages/client/builtin/katex-lines.ts packages/client/builtin/KaTexBlockWrapper.test.ts
  • pnpm --filter @slidev/types build && pnpm --filter @slidev/parser build && pnpm --filter @slidev/cli build && pnpm -C demo/starter run build

Note: pnpm typecheck currently stops in docs/node_modules/vitepress with missing declaration-file diagnostics before reaching the touched files.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 2, 2026

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 7ff2e10
🔍 Latest deploy log https://app.netlify.com/projects/slidev/deploys/6a03e2c1396fb90008e06c63
😎 Deploy Preview https://deploy-preview-2579--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@antfu antfu requested a review from kermanx May 7, 2026 05:12
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 13, 2026

Open in StackBlitz

@slidev/client

npm i https://pkg.pr.new/@slidev/client@2579

create-slidev

npm i https://pkg.pr.new/create-slidev@2579

create-slidev-theme

npm i https://pkg.pr.new/create-slidev-theme@2579

@slidev/parser

npm i https://pkg.pr.new/@slidev/parser@2579

@slidev/cli

npm i https://pkg.pr.new/@slidev/cli@2579

@slidev/types

npm i https://pkg.pr.new/@slidev/types@2579

commit: 7ff2e10

@kermanx kermanx merged commit c035c86 into slidevjs:main May 13, 2026
20 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.

Latex Line Highlighting broken

2 participants