Skip to content

Commit

Permalink
fixup: stop column count on \r
Browse files Browse the repository at this point in the history
  • Loading branch information
samypr100 committed Mar 1, 2024
1 parent 20b85f2 commit d0f7161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/requirements-txt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ fn calculate_line_column_pair(content: &str, position: usize) -> (usize, usize)
if char == '\n' {
line += 1;
column = 1;
} else {
} else if char != '\r' {
column += 1;
}
}
Expand Down

0 comments on commit d0f7161

Please sign in to comment.