Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression15 of 424 shot(s) changed. A change here is a question, not a failure: check whether the after is the
Generated by PR Enrichment workflow | View full report |
|
@cixzhang — I’d appreciate your feedback on this draft. Focus: Authors can place a blank line before a fenced code block inside a list item without the fence escaping the item or rendering as stray text. This is PR 1/20 in the linked Markdown stack. It is intentionally one commit and one primary intent; the description includes matched before/after screenshots and previous/next links, so you can review just this PR’s delta. |
humbertovirtudes
left a comment
There was a problem hiding this comment.
findSettledBoundary() now holds the boundary before an entire active list, so a streamed loose list never advances the settled prefix until the list ends. parseMarkdownIncremental() consequently reparses the whole growing list on every update, turning character streaming into quadratic work and defeating the tail-bounded cache contract. Please keep only the current item or open fence mutable, allow completed list segments to settle through the existing merge path, and add a two-size work-counter regression including the claimed CRLF case.
5ea3d97 to
d6cbc28
Compare
User impact
Authors can put a blank line before a fenced code block, paragraph, or nested list inside a list item, and that block stays in the item in both full and streamed rendering.
Problem and solution fit
The block parser ended every list item at a blank line, so indented blocks after it escaped the item and indented fences rendered as stray text. An item now continues after blank lines when the next line reaches the marker's content indent (CommonMark spacing). Tight nesting, including two-space bullets under ordered items, is unchanged. Streaming settles completed blocks inside open list items by resuming the real block parser, so long items stay incremental.
Expected behavior and authority
Markdown component contract FR11 (streaming convergence) and FR23 (supported dialect); AST-036 FR21–FR23 (no duplicate callbacks, parser budgets, exact tracked performance records unchanged).
Writing rubric results
Smallest restoration
Teach full and incremental parsing to retain blank-separated blocks that reach the owning list marker's content indent, while preserving tight nesting, parser callback counts, streaming convergence, and tracked performance budgets.
Evidence
parser.perf.test.tstracked whole-prefix numbers are unchanged.Scope
Testing
vitest run packages/core/src/Markdown packages/core/src/Outline packages/core/src/CodeBlock— 25 files, 866 tests.tsc --project packages/core/tsconfig.json --noEmit.eslint .— 0 errors.pnpm check:repo, includingcheck:knowledge.Stack
Base:
main· Next: #6657 · Each PR is intentionally one commit and one primary intent.