Skip to content

🐛 fix(markdown): normalize excessive blank lines in Markdown rendering#1300

Merged
harehare merged 2 commits intomainfrom
fix/normalize-blank-lines
Feb 19, 2026
Merged

🐛 fix(markdown): normalize excessive blank lines in Markdown rendering#1300
harehare merged 2 commits intomainfrom
fix/normalize-blank-lines

Conversation

@harehare
Copy link
Copy Markdown
Owner

  • Limit consecutive blank lines to 2 in Markdown output
  • Add tests for excessive and three blank lines

This improves output consistency and fixes edge cases in Markdown rendering.

https://github.com/harehare/mq/discussions/1299

- Limit consecutive blank lines to 2 in Markdown output
- Add tests for excessive and three blank lines

This improves output consistency and fixes edge cases in Markdown rendering.
Copilot AI review requested due to automatic review settings February 19, 2026 12:08
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 aims to improve consistency of Markdown rendering output by normalizing runs of blank lines (capping consecutive blank lines), and adjusts tests to reflect the new normalized output behavior.

Changes:

  • Clamp inter-node newline insertion in Markdown rendering to a maximum of 2 newlines.
  • Add regression tests covering excessive blank lines between blocks.
  • Update an XML CLI integration test expectation to match the new normalized trailing-newline behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/mq-markdown/src/markdown.rs Clamps inserted newlines to reduce excessive blank lines; adds regression test cases.
crates/mq-run/tests/integration_tests.rs Updates expected XML output string to reflect normalized newline behavior.

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 2 out of 2 changed files in this pull request and generated no new comments.

@harehare harehare merged commit f410699 into main Feb 19, 2026
12 checks passed
@harehare harehare deleted the fix/normalize-blank-lines branch February 19, 2026 12:41
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.

2 participants