- 7 minutes to read

Compare Articles

New 7.12

See exactly what changed. The compare tool puts two documents, or two revisions of the same document, next to each other and marks every changed line, so you can review an edit, check what a rewrite removed, or see how two runbooks differ before you merge them by hand.

  • ✅ Compare two revisions of an Article, or any revision against the current text
  • ✅ Compare two different documents, even an Article against a Snippet
  • ✅ Step through the revisions on each side without leaving the tool
  • ✅ Switch between side-by-side panes and an inline Lines, Words, or Chars view

Understanding the Compare Tool

The compare tool is one read-only dialog with a left and a right side. Each side shows one document at one point in time: its Current text, or one of its stored revisions from the Revision History. You open the dialog from five places, and each one fills in the sides for you.

graph LR RevModal[fa:fa-code-branch Revision dialog
Compare side by side] WithSel[fa:fa-list-check With Selected
Compare 2] RowAction[fa:fa-ellipsis-vertical Action
Compare...] History[fa:fa-clock-rotate-left History card
Compare] Reader[fa:fa-book-open Reader page
Compare] Compare[fa:fa-code-compare Compare dialog] Left[fa:fa-file Left side
document + revision] Right[fa:fa-file Right side
document + revision] RevModal --> Compare WithSel --> Compare RowAction --> Compare History --> Compare Reader --> Compare Compare --> Left Compare --> Right style RevModal fill:#2678BD style WithSel fill:#2678BD style RowAction fill:#2678BD style History fill:#2678BD style Reader fill:#2678BD style Compare fill:#93d16d style Left fill:#3F827B style Right fill:#3F827B

Blue are the five ways in: the revision dialog of the History card, With Selected on the lists (Bulk Actions), a row's Action menu, the editor's History card, and the reader page. Green is the compare dialog; teal are its two sides.

Part What it does
Side header LEFT or RIGHT, the document's title, and its kind (Article, Snippet, Template, Document Profile)
Revision picker Chooses Current or any stored revision for that side; ‹ and › step one revision at a time
Info line Under the picker: Current text · changed … by …, or Revision 4 (4 of 6) · … by … with a Profile changed badge when that save changed the Document Profile, plus the size of the text
Change Picks another document for that side: Article…, Snippet…, Template…, or Document Profile…
Tabs Whole document (composed), plus one tab per Content Part when both sides follow the same Document Profile
View Side by side (default) or Inline with Lines, Words, or Chars
Change navigation ˄ and ˅ jump to the previous or next change; the counter shows which change you're on, out of how many
Ignore whitespace Differences in spaces and tabs are not marked; works in Side by side and in Inline with Lines or Words
Show hidden characters Draws spaces, tabs, and line ends in the panes
Swap sides Switches the left and right sides

The compare tool only reads. It never changes a document, so anyone who can read the documents in the Repository can use it. To take text back from a revision, use Restore or Clone from this revision in the revision dialog.

Open the Compare Tool

Where Click Left side Right side
Revision dialog (History card > a revision) Compare side by side The revision you opened Current
Articles, Snippets, Templates, or Document Profiles list Tick exactly two rows, then With Selected > Compare (2) The first ticked document, Current The second ticked document, Current
Same lists A row's Action > Compare… That document, Current The document you pick
Article editor Compare in the History card header This document, Current The document you pick
Reader page (Reading Articles) Compare in the header This document, Current The document you pick

Compare (2) appears on the With Selected menu only when exactly two rows are ticked.

With Selected menu with two Articles ticked and Compare (2) highlighted (7.12)
Tick two documents to compare their current text in one step.

To put another document on a side, click Change in that side's header and choose the kind: Article…, Snippet…, Template…, or Document Profile…. Then pick the document. Any two kinds can be compared, such as an Article against a Snippet.

Change menu of a compare side with Article, Snippet, Template, and Document Profile (7.12)
Choose the kind first; you can compare an Article with a Snippet, a Template, or another Article.

Side by Side

Side by side is the default view. The two texts sit in aligned panes, read only, with line numbers, and every changed line is marked. The line above the panes reminds you how to read them: Removed lines are what the left has and the right does not. Long unchanged stretches fold into (…), so the changes stay in view.

Compare dialog side by side, left Current and right Revision 4 of 6 with a Profile changed badge, lines added on the right marked (7.12)
Each side states which revision it shows, when it was saved, by whom, and how big the text is.

Click ˅ to jump to the next change and ˄ to the previous one; the counter, such as 1 / 3, shows where you are.

Two toggles next to the change navigation help with text that differs only in layout:

  • Ignore whitespace stops marking differences in spaces and tabs, so reindented or retabbed lines don't hide the real changes. It also applies to the Inline view in the Lines and Words modes.
  • Show hidden characters draws spaces, tabs, and line ends in the panes, so you can see why two lines that look the same are marked as changed.

The divider between the panes works like the split editors elsewhere in Nodinite, such as the Stylesheet and Custom Metadata editors:

  • Drag the divider to give one pane more room.
  • Toggle Horizontal/Vertical Mode stacks the panes on top of each other, or puts them side by side again.
  • Maximize gives the panes the whole dialog.

Your ratio and orientation are remembered for you, like every other split.

When the two texts are identical, the dialog says Identical. above the panes and still shows both texts.

Inline View

Switch the view to Inline to read the changes as one marked-up text, like the inline diff in the revision dialog. Choose how fine-grained the marking is:

Mode Marks Hidden when
Lines Whole changed lines Never
Words Changed words inside a line A text is longer than 40,000 characters
Chars Changed characters A text is longer than 10,000 characters

Compare dialog in the Inline view with Words selected, changed words marked inside the lines (7.12)
Words is the easiest mode for prose; Chars catches a single changed digit in a version number or an id.

Step Through Revisions

Each side has its own revision picker. Choose Current or any stored revision, newest first, each with its time and author. Click ‹ (older) or › (newer) to move one revision at a time and watch the changes follow.

Revision picker of the left side opened, listing Current and the stored revisions with time and author (7.12)
Pick any revision for either side; the side header updates to show which one you're on.

The same text is never on both sides. When both sides show the same document, the revision chosen on the right is left out of the left side's picker, and ‹ and › step over it, and the other way round. In the screenshot above, the right side shows Revision 4, so the left side's picker skips it. Two different documents have no such limit.

Click Change on a side to compare against another document, and Swap sides in the footer to switch left and right.

Compare Content Parts

The Whole document (composed) tab compares the full text, Main Body and every Content Part, as one document. When both sides follow the same Document Profile, the dialog adds one tab per Content Part, so you can compare one section at a time. A part that exists on only one side is labelled (not on the left) or (not on the right).

Two documents on different Document Profiles, or without one, are compared on the composed text only.

Comparing two Document Profiles compares their structure: the description, then one line per Part with its kind, name, Snippet token or Section Key, whether it's required, and the Main Body. Use it to see what a profile change added or removed.

Frequently Asked Questions

Can I change the text in the compare tool?

No. The compare tool only reads. To bring back text from a revision, open the revision from the History card and choose Restore whole document, or Clone from this revision to start a new document from it. See Revision History.

Why is Compare (2) missing from With Selected?

It appears only when exactly two rows are ticked. Untick the others, or use the row's Action > Compare… and pick the second document.

Why are Words and Chars missing?

One of the texts is too long for that mode: Words is hidden above 40,000 characters and Chars above 10,000. Use Lines, or the Side by side view.

Why are two lines marked as changed when they look the same?

They differ in spaces, tabs, or line ends. Turn on Show hidden characters to see the difference, or Ignore whitespace to stop marking it.

Why don't I see Content Part tabs?

The two documents don't follow the same Document Profile. The dialog then compares the composed text only.

Can I compare revisions that I purged?

No. Purge revisions removes them for good, so they're no longer listed in the revision picker.

Next Steps