Wilfred / difftastic

a structural diff that understands syntax 🟥🟩
https://difftastic.wilfred.me.uk/
MIT License
19.94k stars 317 forks source link

Unchanged HTML reported as changed #696

Closed Krinkle closed 2 months ago

Krinkle commented 2 months ago

Description

Screenshot

Test case

Permalinks, the files are identical to the best of my knowledge:

curl https://raw.githubusercontent.com/jquery/blog.jquery.com-theme/6710984735eb980cc9845b17f98aa0db8eac09e6/jquery/search.php > search-1.php
curl https://raw.githubusercontent.com/jquery/jquery-wp-content/43bc52a23a7829701e599f8775061dfe1ba42028/themes/jquery/search.php > search-2.php

difft search-1.php search-2.php

Compared to:

$ diff -w -u search-*.php
$

(zero exit status, no difference found.)

Versions

$ difft --version
Difftastic 0.57.0 (built with rustc 1.77.1)

$ diff --version
diff (GNU diffutils) 3.7
Delapouite commented 2 months ago

These files differ in regards to their line endings (linux vs windows). You need to use the --strip-cr flag:

difft --strip-cr search-1.php search-2.php