Skip to content

Make preprocessDisplayMath indentation-aware#84

Merged
PatrikBak merged 1 commit into
mainfrom
patrik/preprocessor-list-indent
May 10, 2026
Merged

Make preprocessDisplayMath indentation-aware#84
PatrikBak merged 1 commit into
mainfrom
patrik/preprocessor-list-indent

Conversation

@PatrikBak
Copy link
Copy Markdown
Owner

Summary

  • preprocessDisplayMath now keeps display math attached to its enclosing list item instead of breaking the list at column 0.
  • Three regimes: own-line $$ preserves leading whitespace on every emitted line; mid-line $$ on a list-marker line uses the marker depth as indent; everything else falls back to original behavior.
  • Adds 8 unit tests covering both regimes (2/3/4-space depths, multi-line content, - / 1. / nested - markers, and the negative "outside any list" case) and 4 integration fixtures (own-line and mid-line × directive and native lists).

🤖 Generated with Claude Code

Display math nested inside list items now stays attached to the item
instead of breaking out: own-line `$$` preserves its leading indent on
every emitted line, and mid-line `$$` on a list-marker line picks up
the marker depth as indent.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
math-comps Ready Ready Preview, Comment May 10, 2026 5:10pm

@PatrikBak PatrikBak merged commit 3785681 into main May 10, 2026
4 checks passed
@PatrikBak PatrikBak deleted the patrik/preprocessor-list-indent branch May 10, 2026 17:13
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.

1 participant