Compare Text Revisions with Meld
How Meld compares text revisions, what its highlighting does and does not show at the word level, when a word-diff workflow fits better, and how to check that compared text stays usable.
Meld is an open-source visual diff and merge tool for comparing files, folders and version-controlled projects. It is useful when you need to check what an edit changed: a reworded paragraph, a corrected caption, or a passage that may have been altered by a text transformation such as reversal, mirroring or Unicode styling. This guide covers what a Meld comparison shows, how it differs from word-level diff workflows, and the points to check before relying on the result.
What a Meld comparison actually changes
A comparison in Meld does not transform your text. It places two or three versions side by side and marks where they differ. The stored characters stay the same until you deliberately copy a change from one pane to another, or edit and save a file. The highlighting, alignment and connecting markers are display features of the application. They are not written into the files.
Meld's comparison is organized by lines. It aligns matching lines and marks blocks that were inserted, deleted or changed. Inside a changed line it also highlights the specific differing span. This inline highlighting is the closest Meld comes to a word-level view. It is not a separate word-diff mode, so a small edit in a long, unwrapped paragraph still shows up as a change to the whole line, with the inline marks pointing to the edited part. How fine the inline highlighting is can vary between versions, so check it on your own material.
Several kinds of transformation need to be kept apart, because a diff tool treats them very differently:
- Character-order reversal: the stored characters are rearranged, for example "draft" becomes "tfard". A diff tool sees a complete change, because the character sequence is different.
- Visual mirroring: the text is flipped by a display effect, such as a CSS transform or an image, while the stored characters are unchanged. Copy the underlying text into a file and it compares as identical to the original.
- Unicode character substitution: letters are replaced with look-alike or styled code points, such as mathematical alphanumeric symbols or small-capital forms. On screen the text may look like the original. As stored data it is a different sequence, so a diff marks it as changed even when you cannot see a difference.
- CSS presentation: bold, italic, letter spacing or flipped rendering applied by a stylesheet affects only the page display. Plain-text copies usually leave the styling behind, and the comparison sees only the characters.
- Bidirectional display: right-to-left scripts and invisible direction-control characters change the order in which text is shown, not the order in which it is stored. A diff compares stored order, so a line can look rearranged in one application and identical in another.
In short, a diff answers whether the stored text is the same. It does not tell you whether the text looks the same. When appearance and storage disagree, as with look-alike characters or direction controls, the diff result is the more reliable guide to what will be copied, searched or indexed.
Which comparison approach suits your revision task
For prose revisions, the main choice is between Meld's visual, line-oriented view and a word-level diff run from the command line. Git's word-diff option is one documented example of the second approach. Both can work. They differ in how readably each presents changes to running text.
| Criterion | Meld (visual, line-based with inline highlights) | Command-line word diff (for example git diff --word-diff) |
| What it displays | Side-by-side panes with aligned blocks and highlighted spans inside changed lines | A single stream of text with removed and added words marked inline |
| Best suited to | Reviewing, accepting or rejecting changes one block at a time; merging three versions | Reading prose edits where paragraphs are long single lines |
| Editability | You can edit directly in the panes and move changes between versions | Read-only output; edits happen elsewhere |
| Shareable output | The highlighting stays inside the application | Plain text that can be saved, pasted or reviewed by others |
| Effect on stored text | None unless you edit and save | None |
| Reversibility | Edits can be undone during a session; saved files are overwritten unless you keep copies or use version control | Nothing to reverse, because it only reports |
Choose Meld when you need to act on the differences: accepting some edits, rejecting others, or reconciling a base version with two sets of changes. Choose a word-level diff when you mostly need to read what changed in prose, or when you need a plain-text record of the changes for someone else.
Line wrapping has a large effect on the result. If each paragraph is stored as one long line, any line-based tool reports whole-paragraph changes. Storing prose with one sentence per line, sometimes called semantic line breaks, makes Meld's view much more precise, because each changed sentence becomes its own block. The tradeoff is that the files need reformatting, which may not suit text that will be pasted somewhere sensitive to line breaks.
The following example is illustrative and was not captured from a test run. It shows the same matched input as the two approaches would present it.
Original: The update ships in the spring release.
Revised: The update now ships in the autumn release.
Line-based view (illustrative):
- The update ships in the spring release.
+ The update now ships in the autumn release.
(Meld would also highlight "now" and "autumn" within the changed line)
Word-level view (illustrative, git --word-diff style):
The update {+now+} ships in the [-spring-]{+autumn+} release.
To open two revisions in Meld from a terminal, pass both file paths. If the text is under Git version control, you can set Meld as the difftool so that revisions open in its visual view. A word-level diff is a separate command.
meld draft-v1.txt draft-v2.txt
git difftool -t meld HEAD~1 -- draft.txt
git diff --word-diff HEAD~1 -- draft.txt
Available options and their exact behavior depend on the installed versions of Meld and Git. Check your local help output before building them into a workflow.
Will compared text stay readable and usable where you need it?
The comparison view and the text itself have different limits, so consider them separately.
Copying and pasting: text copied out of a Meld pane is the plain stored text. The colored highlighting and alignment are not part of the clipboard content. If a reviewer needs to see the changes, give them a plain-text diff, such as a word-diff or unified-diff output saved to a file, rather than expecting highlights to carry over. This guide has no test results on how particular destination applications handle pasted Meld content, so check the destination yourself.
Accessibility: a visual diff relies heavily on color and position to show change. That can be hard to use for people with color-vision differences and for screen-reader users. This guide has no documented testing of how Meld's comparison view works with specific assistive technologies. A textual diff in which additions and removals are marked with characters, as in the word-diff example above, does not depend on color and is a practical alternative when accessibility matters.
Hidden-character differences: if two versions look identical but Meld marks a difference, the cause is often a character you cannot see. Common causes are trailing spaces, different line endings, non-breaking spaces, zero-width characters, direction-control marks and look-alike substituted letters. Inspect the affected span with a tool that reveals code points before deciding which version is correct. Styled Unicode text is a common source of this problem. It can look fine yet break search, spell-checking and screen-reader output, so a plain-text version is usually the safer choice for the final copy.
Encoding and line endings: files saved with different encodings or line-ending conventions can produce differences on every line. Normalize both files to the same encoding and line-ending style before comparing, so that the diff shows real edits only.
Handling sensitive text: Meld runs as a desktop application and compares files on your own machine. For confidential drafts, a local tool avoids sending the text to a third party. Browser-based diff services work differently: pasting text into one transmits it to an external server, where it may be logged or retained. If you use such a service, review its data-handling terms first, or remove confidential details from the text.
Gaps in this guide: no version-specific test results, rendering measurements or assistive-technology test reports were available. Statements about Meld's display behavior describe its general documented design. Confirm details such as inline-highlight granularity, text filters and export options in the version you have installed.