Trim a trailing whitespace on empty line inside code block comment

This commit is contained in:
Seiichi Uchida 2017-12-11 11:37:13 +09:00
parent 97fd517593
commit 5faf31bb32

View File

@ -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;
}