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!

@matthewhughes934 matthewhughes934 force-pushed the fix-formatting-non-rust-blocks branch from a44f0e8 to 9242949 Compare January 21, 2026 21:25
@rustbot

This comment has been minimized.

@jieyouxu jieyouxu added S-waiting-on-review Status: awaiting review from the assignee but also interested parties. UO-format_code_in_doc_comments Unstable option: format_code_in_doc_comments F-impacts-unstable-options Expected formatting impact: only affects code formatted by unstable options and removed pr-not-reviewed labels Feb 19, 2026
* 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 9242949 to 0a9f14d Compare February 25, 2026 19:00
@rustbot
Copy link
Collaborator

rustbot commented Feb 25, 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

Labels

F-impacts-unstable-options Expected formatting impact: only affects code formatted by unstable options S-waiting-on-review Status: awaiting review from the assignee but also interested parties. UO-format_code_in_doc_comments Unstable option: format_code_in_doc_comments

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

4 participants