Skip to content

Fix incorrect whitespace modifications to non-rust code blocks#6615

Open
matthewhughes934 wants to merge 1 commit intorust-lang:mainfrom
matthewhughes934:fix-formatting-non-rust-blocks
Open

Fix incorrect whitespace modifications to non-rust code blocks#6615
matthewhughes934 wants to merge 1 commit intorust-lang:mainfrom
matthewhughes934:fix-formatting-non-rust-blocks

Conversation

@matthewhughes934
Copy link

  • Fix whitespace was being prepended to leading blank line
  • Fix trailing blank line was being stripped

Fixes: #6609
Fixes: #6015

@joshtriplett
Copy link
Member

This looks good to me; thanks for working on it!

* Fix whitespace was being prepended to leading blank line
* Fix trailing blank line was being stripped

Fixes: rust-lang#6609
Fixes: rust-lang#6015
@matthewhughes934 matthewhughes934 force-pushed the fix-formatting-non-rust-blocks branch from a44f0e8 to 9242949 Compare January 21, 2026 21:25
@rustbot
Copy link
Collaborator

rustbot commented Jan 21, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

format_code_in_doc_comments should not touch non-rust code blocks format_code_in_doc_comments adds trailing whitespace on the leading empty line

3 participants