Fix parser to stop looping forever on U+2028 or U+2029 in blockquotes #31
main fromrefs/pull/31/head·merged by tannerlinsley Fix blockquotes containing U+2028 or U+2029 so parsing consumes the line and finishes. Elwan's original fix, regression and patch changeset are preserved, refreshed against Markdown 1.1.0.
Fixes #30
AI review notes: Exact current base d671a2e and composed head 91dba73 were independently checked. All 23 selective and complete namespace entries were measured with the same Node24/compiler/compression. Only 11 necessary ceiling updates were made, with maximum increases of 1 minified byte, 3 gzip bytes and 13 Brotli bytes per affected entry, within the owner's narrow acceptance for this fix. Separately imported extension ceilings stay unchanged.
The actual local verify script passes 338 tests, types, build, 28 documentation pages, six skills, conformance and packaging. The same 403 of 652 CommonMark examples pass. Exact-head CI 41360891982 also passes, including the external corpus, packed Node 22/24 and React 18/19 consumers and all six streaming-browser combinations.
The exact released 1.1.0 baseline times out on the reported quote input, and six finite Unicode cases pass with HTML/React/Octane, core/docs extensions, serialized AST and URL policy. Two matched repetitions and two fresh-process repeats compare every completed progressive update. An initially noisy small-document result did not repeat with isolated processes. No material workload regression was demonstrated, and no general speedup or allocation claim is made. Retained heap/RSS controls remain noisy.
Merged normally as e4112c5. Release PR #35 targets 1.1.1 and is running normal CI. Publication and downloaded-artifact verification are still pending.
- 1
🦋 Changeset detected#
Latest commit: 91dba73666af55c874bc4c16d56810258385911b
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
Name Type @tanstack/markdown Patch Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
tannerlinsley merged thise4112c5
tannerlinsley closed this
Sign in to join this conversation.
No actionable comments were generated in the recent review.
3d171151-8fa8-4df4-8218-48fbfcc900dcReviewing files that changed from the base of the PR and between d0a5dab3068d11bd407df764cabcd332cdb3600b and 91dba73666af55c874bc4c16d56810258385911b.
tests/bundle-size.test.tsIncluded review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
Walkthrough
The blockquote parser now uses dot-all matching. A regression test covers U+2028 and U+2029 separators, bundle-size ceilings are updated, and a patch changeset is added.
Changes: Blockquote parser fix
src/parser.ts,tests/audit-regressions.test.tsx,tests/bundle-size.test.ts,.changeset/blockquote-line-separators.mdparseBlockquoteuses dot-all matching. The regression test checks rendering with U+2028 and U+2029 under a timeout. Bundle-size ceilings and the patch changeset are also updated.Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers:
tannerlinsleyMerge Risk:
Minimal · up to
91dbaNo actionable merge-blocking risk is identified. The bundle-size ceiling adjustments are consistent with the reported parser fix; merge readiness remains subject to normal checks.
Pre-merge checks:
5
src/parser.tsadds thesflag to the secondparseBlockquoteregex. The regex now consumes U+2028 and U+2029, so the parser advances past affected blockquote lines. `tests/audit-reg…#30. The bundle-size budget updates account for the parser change. The changeset records the package patch release. No unrelated changes are shown in the pu…Full details: Linked Issues check
Explanation
The change in
src/parser.tsadds thesflag to the secondparseBlockquoteregex. The regex now consumes U+2028 and U+2029, so the parser advances past affected blockquote lines.tests/audit-regressions.test.tsxcovers both separators and runs in a subprocess with a timeout. This satisfies the coding requirement in issue#30.Full details: Out of Scope Changes check
Explanation
The regression test directly verifies issue
#30. The bundle-size budget updates account for the parser change. The changeset records the package patch release. No unrelated changes are shown in the pull request diff.Finishing Touches
Generate unit tests (beta)
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.
Share