What diffing does
The tool treats each input as a list of lines and runs a line-by-line comparison. Lines present in the new version but not the old are marked as additions; lines present in the old but not the new are marked as deletions; lines that appear in both are unchanged. The result is a colour-coded view that lets you scan the changes at a glance.
Diffing operates on whole lines by default. A line counts as changed if any character within it differs, even a single space — which is why cleaning both versions first matters so much.