lone image inside a paragraph tag
sethjfischer opened this issue · 3 comments
sethjfischer commented
Adding or removing a lone image inside a paragraph tag when the paragraph above also has a change doesn't show as an addition or a deletion for the image. Tested on http://php-htmldiff.caxy.com/ with this code:
OLD HTML:
<p>this is a test</p>
<p>new test</p>
<p><img src="https://storage.googleapis.com/gweb-uniblog-publish-prod/static/blog/images/google-200x200.7714256da16f.png" alt="" /></p>
<p></p>
<p></p>
NEW HTML:
<p>this is a test</p>
<p></p>
<p></p>
RemkoNolten commented
We've been experiencing the same issue. Our text editor often produces a single img
tag in a paragraph. It appears to work fine when there is (for example) other text or whitespace inside the paragraph, but when the paragraph only contains the image there is no <ins>
or <del>
tag added.
bradleyjond commented
Also seeing this issue.
sebreb commented
It's the same here.
Furthermore, when doing the inverse operation, the diff doesn't detect an insertion as shown below.
OLD: empty
NEW:
<p><img src="https://fr.wikipedia.org/static/images/mobile/copyright/wikipedia.png" alt="wikipedia.png"></p>