-
-
Notifications
You must be signed in to change notification settings - Fork 196
Fix tables within list items regression #757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 59a9810 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
@copilot include a changeset with your fix |
Tables within list items were not being parsed correctly because processListContinuationLine passed single lines to parseBlocksWithState, but parseTable requires multiple consecutive lines. The fix adds table parsing similar to fenced code blocks - calling parseTable directly when the continuation line starts with |, allowing the table parser to read multiple lines. Added regression tests to prevent this issue from recurring. Co-authored-by: quantizor <[email protected]>
Co-authored-by: quantizor <[email protected]>
|
@copilot investigate blockquotes as well, are tables rendering properly inside them? do we have an existing test for it? |
Tables inside blockquotes are rendering correctly: <blockquote><p><strong>Browser Stats</strong>:</p><table><thead><tr><th>Computer</th><th>Memory Usage</th></tr></thead><tbody><tr><td>FireFox</td><td>86%</td></tr><tr><td>Chrome</td><td>80%</td></tr></tbody></table></blockquote>No existing test for this specific case. Would you like me to add one? |
Tables within list items stopped rendering since v9.0.0, appearing as plain text instead.
Root cause:
processListContinuationLinepassed single lines toparseBlocksWithState, butparseTablerequires multiple consecutive lines (header + separator + rows) to recognize table syntax.Fix: Added direct
parseTableinvocation when continuation line starts with|, matching the existing pattern for fenced code blocks. This allows the table parser to read ahead for all table rows.Added regression tests covering tables in single and multiple list items.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Note
Ensures tables inside list items are parsed as table nodes (not plain text) and adds regression tests; patch release noted.
processListContinuationLine(src/parse.ts), when a continuation line starts with|, callparseTableand append the resultingtablenode; advance position accordingly.src/parse.spec.tsfor:Written by Cursor Bugbot for commit 59a9810. This will update automatically on new commits. Configure here.