mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-05 21:24:12 +00:00
Trim a trailing whitespace on empty line inside code block comment
This commit is contained in:
parent
97fd517593
commit
5faf31bb32
@ -332,7 +332,11 @@ fn rewrite_comment_inner(
|
||||
inside_code_block = !inside_code_block;
|
||||
}
|
||||
if inside_code_block {
|
||||
result.push_str(line);
|
||||
if line.is_empty() && result.ends_with(' ') {
|
||||
result.pop();
|
||||
} else {
|
||||
result.push_str(line);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user