Repository navigation
fix(app-bundle): digit-led single-$ math — move currency guard to close side - #1727
Open
aarontrowbridge wants to merge 1 commit into
Open
aarontrowbridge wants to merge 1 commit into
aarontrowbridge wants to merge 1 commit into
Conversation
…se side Port of harmoniqs/opencode#376 (closes #1725). The single-$ inline-math rule rejected any math whose opening $ was followed by a digit; move the digit guard to the close side (Pandoc's actual currency rule). Overlay is post-absorption source of truth, so the fix lands directly in marked-parser.tsx with the manifest refreshed (851 files, drift gate green). Regression tests: the two reported digit-led snippets + tight $30-and-$50 currency pair, verified in the materialized tree (10/10).
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
aarontrowbridge
marked this pull request as ready for review
October 7, 2026 23:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1725.
What
Port of harmoniqs/opencode#376 (the fix for harmoniqs/opencode#375): chat LaTeX like
.53\times10^{-5}$rendered raw because the single-$inline-math rule rejected any math whose opening$is followed by a digit.Note on the issue's original framing: #1725 was drafted as an overlay re-extract at
v1.18.10-amicode.23— but the overlay doctrine changed since the fork absorption (#1091): the overlay is now the source of truth, maintained directly (fork archived, drift gate checks overlay↔manifest, not fork bytes). So this PR edits the overlay directly rather than re-extracting. The issue title predates that realization.Changes
overlay/packages/ui/src/context/marked-parser.tsx— digit guard moved from the open side of the delimiter to the close side (Pandoc's actual currency rule: the closing$must not be followed by a digit).-and-stays literal;.53\times10^{-5}$renders.overlay/packages/ui/src/context/marked-math.test.ts— 2 new tests: digit-led positives (the two reported snippets) + tight digit-pair currency negative; plusrenderMathInTextcoverage.manifest.json— auto-refreshed by materialize (851 files at exact hashes).Verification
drift_gate.mjs— PASS (overlay and manifest in sync)bun test src/context/marked-math.test.tsfrompackages/ui— 10 pass / 0 fail, through the realcreateMarkdownParserpipelineAfter merge
scripts/rebuild_amicode_locally.sh+ window reload; verify($3.53\times10^{-5}$ — nice determinism check for free)renders in chat.