rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

Backport 4304

Open ytmimi opened this issue 3 years ago • 0 comments
trafficstars

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

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 Closes #5421

ytmimi avatar Mar 31 '22 23:03 ytmimi