Diff two texts
text_diffCompare two texts line by line to return a unified diff, added/removed/unchanged counts, and paired change blocks with word-level edits; optionally ignore whitespace and case.
Instructions
Compare two texts line by line (Myers diff) and return a unified diff (3 lines of context, like diff -u), counts of added/removed/unchanged lines, and change blocks where each removed line is paired with the added line that replaced it and the changed words are marked [-old-] / {+new+}. Can ignore whitespace and case. Works with any language (Arabic included). Up to 50,000 lines per side. Web version: https://s3eidat.github.io/diff-view/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nameA | No | Label for the "---" header (default "original"). | |
| nameB | No | Label for the "+++" header (default "changed"). | |
| changed | No | The changed text ("after"). | |
| original | No | The original text ("before"). | |
| wordDiff | No | Mark the changed words inside paired lines (default true). | |
| ignoreCase | No | Treat lines that differ only in letter case as equal. | |
| changedPath | No | Or: path to the changed text file. | |
| originalPath | No | Or: path to the original text file. | |
| ignoreWhitespace | No | Treat lines that differ only in spacing as equal. |