# HTML diff view is a bit broken

**URL:** https://meta.discourse.org/t/html-diff-view-is-a-bit-broken/15716
**Category:** Feature
**Created:** [May 16, 2014, 8:02pm UTC](https://meta.discourse.org/t/html-diff-view-is-a-bit-broken/15716 "2014-05-16T20:02:19Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![calmh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/calmh/32/115466_2.png) [@calmh](https://meta.discourse.org/u/calmh)
#### Post date: [May 16, 2014, 8:02pm UTC](https://meta.discourse.org/t/html-diff-view-is-a-bit-broken/15716/1 "2014-05-16T20:02:19Z")

</div>

See the screenshot for a diff on an edit I made. Actually multiple edits, which might be a contributing factor, but combined into one historically (I guess due to being within a five minute window or such).

The meat of the edit is the adding of the last paragraph. But the diff algorithm seems to have latched on to some words in that paragraph that are in the first point in the bulleted list and then kept drawing the wrong conclusions.

 ![](https://global.discourse-cdn.com/meta/original/2X/4/4adedaab8893bbbc7325e45969e231b2b10781f4.png)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 16, 2014, 8:07pm UTC](https://meta.discourse.org/t/html-diff-view-is-a-bit-broken/15716/2 "2014-05-16T20:07:41Z")

</div>

The markdown view is more reliable 😉

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 16, 2014, 9:52pm UTC](https://meta.discourse.org/t/html-diff-view-is-a-bit-broken/15716/3 "2014-05-16T21:52:50Z")

</div>

Yeah, just switch to Markdown view.

---

<div class="post-metadata">

### Author: ![calmh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/calmh/32/115466_2.png) [@calmh](https://meta.discourse.org/u/calmh)
#### Post date: [May 17, 2014, 5:48am UTC](https://meta.discourse.org/t/html-diff-view-is-a-bit-broken/15716/4 "2014-05-17T05:48:53Z")

</div>

Ok, changing the title.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 17, 2014, 5:58am UTC](https://meta.discourse.org/t/html-diff-view-is-a-bit-broken/15716/5 "2014-05-17T05:58:36Z")

</div>

So in this case, just the last para was added? No other edits/changes? Ironically I can’t tell. Can you post a screenshot of the markdown diff?

---

<div class="post-metadata">

### Author: ![calmh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/calmh/32/115466_2.png) [@calmh](https://meta.discourse.org/u/calmh)
#### Post date: [May 19, 2014, 5:46pm UTC](https://meta.discourse.org/t/html-diff-view-is-a-bit-broken/15716/6 "2014-05-19T17:46:52Z")

</div>

Yeah, sorry. 🙂 Markdown diff below; the text at the end was added.

 ![](https://global.discourse-cdn.com/meta/original/2X/b/bc0f0fdd9d0744bcadcf6fd6c6a273fe7bb6da85.png)

---

<div class="post-metadata">

### Author: ![mrmowji](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mrmowji/32/505517_2.png) [@mrmowji](https://meta.discourse.org/u/mrmowji)
#### Post date: [June 15, 2025, 9:30am UTC](https://meta.discourse.org/t/html-diff-view-is-a-bit-broken/15716/7 "2025-06-15T09:30:13Z")

</div>

I know it’s an old thread. But I think this issue hasn’t been resolved yet. And it’s not just the HTML diff. This is from my topic:

 ![Screenshot 2025-06-15 125527](https://global.discourse-cdn.com/meta/original/4X/b/d/c/bdc8dcc9755675b17e70ece2272e4d0fe8ad1129.png)

As you can see, I just added a new line after the image (hence that `ins` I guess). But three lines are highlighted which seems unnecessary. The same is true if I delete an empty line; I’ll get a `del`.
