Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lone image inside a paragraph tag #67

Open
sethjfischer opened this issue Sep 26, 2017 · 3 comments
Open

lone image inside a paragraph tag #67

sethjfischer opened this issue Sep 26, 2017 · 3 comments
Labels

Comments

@sethjfischer
Copy link

sethjfischer commented Sep 26, 2017

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>
@jschroed91 jschroed91 added the Bug label Nov 26, 2017
@RemkoNolten
Copy link

RemkoNolten commented Mar 24, 2021

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
Copy link

Also seeing this issue.

@sebreb
Copy link

sebreb commented Jun 24, 2022

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants