Closed firststeven closed 8 months ago
This is expected. If you want to catch whitespace differences, you need diffWordsWithSpace
. Per the README:
Diff.diffWords(oldStr, newStr[, options])
- diffs two blocks of text, comparing word by word, ignoring whitespace. ...Diff.diffWordsWithSpace(oldStr, newStr[, options])
- diffs two blocks of text, comparing word by word, treating whitespace as significant.
(I was surprised to discover it too.)
Any ideas?
Can anyone else reproduce this issue?
V5.0