1
Fork 0

prevent bogus whitespace error messages due to \r

This commit is contained in:
Oliver Schneider 2015-05-04 14:32:48 +02:00
parent 1655583b02
commit cd3b032e11

View file

@ -127,7 +127,8 @@ fn fmt_lines(changes: &mut ChangeSet) {
let mut cur_line = 1;
let mut newline_count = 0;
for (c, b) in text.chars() {
if c == '\n' { // TOOD test for \r too
if c == '\r' { continue; }
if c == '\n' {
// Check for (and record) trailing whitespace.
if let Some(lw) = last_wspace {
trims.push((cur_line, lw, b));