Skip to content

fix(remend): recognize LaTeX paren and bracket math in emphasis completion#523

Open
PentaTea wants to merge 1 commit into
vercel:mainfrom
PentaTea:codex/remend-latex-math-emphasis
Open

fix(remend): recognize LaTeX paren and bracket math in emphasis completion#523
PentaTea wants to merge 1 commit into
vercel:mainfrom
PentaTea:codex/remend-latex-math-emphasis

Conversation

@PentaTea
Copy link
Copy Markdown

Summary

  • Treat LaTeX paren-style math (\(...\)) and bracket-style math (\[...\]) as math contexts in remend
  • Ignore _ and * inside those math contexts during emphasis completion
  • Add regression coverage for LaTeX math subscripts, asterisks, and bold completion after math

Closes #522

Test plan

  • pnpm --filter remend test
  • pnpm --filter remend build
  • pnpm exec ultracite check packages/remend/src/utils.ts packages/remend/src/emphasis-handlers.ts packages/remend/__tests__/katex.test.ts

Changeset

  • Added a patch changeset for remend

Treat \(...\) and \[...\] as math contexts when completing
Markdown emphasis. This prevents underscores and asterisks inside
LaTeX math from being counted as unclosed Markdown emphasis markers.

Also update emphasis skip logic so math-context checks are not limited
to dollar-delimited math.

Closes vercel#522
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 19, 2026

@PentaTea is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@PentaTea PentaTea marked this pull request as ready for review May 19, 2026 14:15
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.

remend treats LaTeX \(...\) and \[...\] math as text when completing emphasis

1 participant