Closed
Description
Running the standard GNU diff tool on windows can produce diff output with CRLF line endings instead of LF line endings. This currently causes an error in this diff parser.
To reproduce, run the go-diff diagnostic tool on the attached diff:
go-diff -f sample_diff_win.txt
and get the following error:
err read file(0): line 3, char 116: bad hunk header: @@ -1,3 +1,9 @@
The parser uses an in-built line reader instead of bufio.Scanner
which does not strip trailing CR characters from lines (unlike bufio.Scanner
)
Metadata
Metadata
Assignees
Labels
No labels