Skip to content

Do not add trailing space to empty lines in comment code blocks #4304

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

Merged
merged 1 commit into from
Jul 3, 2020

Conversation

ayazhafiz
Copy link
Contributor

Currently, the first line pushed in a code block is a comment line
delimiter that includes a trailing space, even if the content of that
line is empty. Later lines are handled correctly because their content
is checked before adding the comment line delimiter. So, just apply the
same logic as is done for later lines to the first line.

Closes #4251

Currently, the first line pushed in a code block is a comment line
delimiter that includes a trailing space, even if the content of that
line is empty. Later lines are handled correctly because their content
is checked before adding the comment line delimiter. So, just apply the
same logic as is done for later lines to the first line.

Closes rust-lang#4251
Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Contributor

@topecongiro topecongiro left a comment

Choose a reason for hiding this comment

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

Thanks!

@topecongiro topecongiro merged commit bd51e8e into rust-lang:master Jul 3, 2020
@ytmimi ytmimi mentioned this pull request Mar 31, 2022
@ytmimi ytmimi added 1x-backport:pending Fixed/resolved in source but not yet backported to a 1x branch and release and removed backport-triage labels Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1x-backport:pending Fixed/resolved in source but not yet backported to a 1x branch and release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrap_comments on/off have inconsistent trailing whitespace handling in code blocks
5 participants