Text Diff: Whitespace, Case, and Line-Break Comparison
A small test matrix for choosing the right comparison mode before reviewing drafts.
Tested 2026-07-18 · Method: 10 paired text samples with one controlled change each · By Dionis Ceban
Bottom line: The safest workflow makes normalization choices explicit, checks a small sample first, and keeps a human review step for meaning-sensitive changes.
Test matrix
| Input or approach | Operation | Observed result |
|---|---|---|
| Hello vs hello | Case-sensitive | Changed |
| Hello vs hello | Ignore case | Same |
| Two spaces vs one | Exact | Changed |
| Two spaces vs one | Ignore whitespace | Same |
Recommended workflow
- Start with exact comparison so no change is hidden.
- If the result is noisy, ignore whitespace—but record that choice.
- Use line mode for prose and lists; word mode for sentence edits.
- Re-run exact mode before final approval when formatting matters.
How to reproduce this test
Copy the examples from the matrix into the relevant tool, apply only the named setting, and compare the output character by character. Browser and operating-system differences should not affect these JavaScript text operations.
What this test does not prove
This is a focused behavior test, not a guarantee for every document. Language rules, proprietary file formats, personally identifying data, and search-engine rendering all require context-specific review.