This is a example to show that there is no good way to diff files with
different file endings with jsdiff.
If you clone this repo on windows (with git autocrlf) you will probably not be able to reproduce the examples below.
On unix Run
file -k crlf.txt lf.txtAnd make sure you see
crlf.txt: ASCII text, with CRLF line terminators lf.txt: ASCII text
Using the
--strip-trailing-cr option.
diff --strip-trailing-cr lf.txt crlf.txt
# Returns nothingUsing the
--ignore-cr-at-eol option.
git diff --no-index --ignore-cr-at-eol crlf.txt lf.txt
# Returns nothingnpm test
# node index.js