Skip to content

🐛 fix(mq-markdown): correct newline rendering before tables#1277

Merged
harehare merged 1 commit intomainfrom
fix/table-newline-rendering
Feb 14, 2026
Merged

🐛 fix(mq-markdown): correct newline rendering before tables#1277
harehare merged 1 commit intomainfrom
fix/table-newline-rendering

Conversation

@harehare
Copy link
Copy Markdown
Owner

  • Fixes an issue where newlines were not properly inserted before the first row of a table when rendering markdown.
  • Adds tests for table rendering after paragraphs and headings.

Closes #1276

- Fixes an issue where newlines were not properly inserted before the first row of a table when rendering markdown.
- Adds tests for table rendering after paragraphs and headings.

Closes #1276
Copilot AI review requested due to automatic review settings February 14, 2026 14:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where newlines were not properly inserted before the first row of a table when rendering markdown. The fix introduces an in_table flag to track whether the rendering is currently inside a table, allowing the renderer to distinguish between the first row of a new table (which needs newlines based on position) and subsequent rows within the same table.

Changes:

  • Added in_table boolean flag to track table rendering state
  • Added newline insertion logic before the first row of a table based on position differences
  • Added test cases for tables appearing after paragraphs and headings

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@harehare harehare merged commit d25771a into main Feb 14, 2026
18 checks passed
@harehare harehare deleted the fix/table-newline-rendering branch February 14, 2026 14:28
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.

Missing Newline Before Table on In-Place Update

2 participants