Blog

How to compare two Markdown document drafts

Compare two Markdown drafts side by side, spot changed text and formatting, and avoid mistaking line wrapping or moved sections for real edits.

Emily ParkerTools and utilities 4 min read

You have two versions of a Markdown file and need to know what changed. A quick visual scan can miss a deleted sentence, a changed link, or a small edit inside a long code block. It can also make harmless line wrapping look like a content change.

Use the Text Compare tool to check the earlier and newer drafts, then review the differences in the context of Markdown syntax. This helps you decide which edits matter before you publish, merge, or send the document.

Compare the drafts

  1. Open Text Compare. Copy the earlier Markdown draft into one input area and the newer draft into the other.
  2. Label the versions for yourself before comparing, such as “before” and “after.” Put the older version first so the direction of each change is clear.
  3. Run the comparison and scan the marked additions, deletions, and changed lines. Start with headings and paragraphs, then review links, lists, and code blocks.
  4. For each difference, check the surrounding lines in both drafts. A line that appears removed and added may have been moved rather than rewritten.
  5. Return to the Markdown editor and accept or copy over only the edits you intend to keep. Save the result as a new version until you have checked it.

Markdown is plain text, so compare the source rather than relying only on how the document looks when rendered. For example, **important** and important may look similar in some contexts, but the first uses bold formatting and the second does not.

What the differences mean

A few words or punctuation marks changed

This is usually a direct edit. Check whether the change alters the meaning, a date, a number, or an instruction. A missing “not” or a changed version number can matter more than several rewritten sentences.

A whole paragraph appears removed and added

The paragraph may have been rewritten, or it may have moved to another location. Search for a distinctive phrase from the old version in the new draft. If you find it elsewhere, the comparison may be showing a move as a deletion followed by an addition. See why moving a paragraph can look like a delete and an add.

Markdown symbols changed

Review the symbols as well as the words. A change from # Heading to ## Heading changes the heading level. Removing the hyphen from - list item may turn a list entry into ordinary text. A missing pair of backticks can change how inline code is displayed.

Links or image references changed

Check the full destination, not just the visible label. In Markdown, [guide](https://example.com/guide) has separate display text and a URL. A URL can change while the label stays the same. Image references use a similar pattern, starting with an exclamation point.

Many lines differ after one small edit

The drafts may use different line endings, spacing, or wrapping. A paragraph that was reflowed onto different source lines can produce many marked lines even if its words are unchanged. Compare the text itself before treating every highlighted line as a separate edit.

How to get a reliable comparison

  1. Compare the right versions. Check file names, dates, and the first and last lines before pasting. Comparing the wrong copy can make a clean draft look like it has unexplained changes.
  2. Keep Markdown syntax intact. Copy from the source editor, not from a rendered preview or a word processor. A rendered copy may remove heading markers, link destinations, or code fences.
  3. Use the same kind of text in both inputs. Do not compare one rendered page with one Markdown source file. If a draft includes front matter, such as a title or date at the top, include it in both versions or exclude it from both.
  4. Review large changes in smaller sections. If a document has been reorganized, compare the introduction, each major section, and the ending separately. This makes it easier to distinguish moved material from new writing. Text comparison can group a large change into one block, so inspect the lines around it. More on that behavior: why text comparison groups large differences into blocks.
  5. Check the rendered result afterward. A text comparison tells you what changed in the source, not whether the final document displays correctly. Preview the updated Markdown and check heading levels, list nesting, links, and code formatting.

What a text comparison cannot decide

A comparison identifies differences between the text you provide. It cannot tell whether a change is correct, whether a new link points to the intended page, or whether a rewritten instruction is clearer. Those checks need your judgment and, where appropriate, a preview or test of the document.

It also does not guarantee that two drafts will render identically in every Markdown editor. Editors can support different extensions, such as tables or task lists, and may interpret some syntax differently. If the document will be published in a specific system, preview it there before treating the comparison as final.