Apply more suggestions.
This commit is contained in:
@@ -120,15 +120,13 @@ pub(crate) fn coalesce_whitespace_if_line_break(input: &str) -> Cow<'_, str> {
|
||||
ret.push(c);
|
||||
}
|
||||
// Do nothing if preceding character was whitespace and this character also is whitespace.
|
||||
} else if c.is_ascii_whitespace() {
|
||||
// Preceding character was not whitespace but this is.
|
||||
sub_loop_in_whitespace = true;
|
||||
ret.push(' ');
|
||||
} else {
|
||||
if c.is_ascii_whitespace() {
|
||||
// Preceding character was not whitespace but this is.
|
||||
sub_loop_in_whitespace = true;
|
||||
ret.push(' ');
|
||||
} else {
|
||||
// Preceding character was not whitespace and this is not either.
|
||||
ret.push(c);
|
||||
}
|
||||
// Preceding character was not whitespace and this is not either.
|
||||
ret.push(c);
|
||||
}
|
||||
}
|
||||
if !*in_whitespace {
|
||||
|
||||
Reference in New Issue
Block a user