Skip to content

Strip block-quote markers from multi-line display math - #353

Open
Joncallim wants to merge 1 commit into
masterfrom
review6-math-quote
Open

Joncallim wants to merge 1 commit into
masterfrom
review6-math-quote

Conversation

@Joncallim

Copy link
Copy Markdown
Owner

Summary

P2 from review pass 6. Multi-line display math inside a block quote (> $$⏎> x^2⏎> $$) reached the renderer with the quote's own > markers on each continuation line: Export typeset "> x² >" (the real MathImageRenderer drew the markers; logical width 55.6 vs 16.6) and used them as alt text, and Preview collapsed it to > $$ > x^2 > $$ and validated the marker-laden LaTeX. MathContainerPrefix detects a quote marker on the span's own line and strips markers (and indentation) from continuation lines; Export's restoringLaTeX and the Preview preprocessor both use it, so Preview now rewrites to > $$ x^2 $$.

Tests

MathQuoteMarkerTests (marker stripping incl. nested/CRLF, quote detection, and a real-ParseEngine export recording "\nx^2\n"), and a Preview preprocessor test; Math suites and the app-target Math suites pass.

🤖 Generated with Claude Code

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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