caxy / php-htmldiff

A library for comparing two HTML files/snippets and highlighting the differences using simple HTML. Includes support for comparing complex lists and tables
http://php-htmldiff.caxy.com
GNU General Public License v2.0
202 stars 51 forks source link

del inside ins #69

Closed tester20000 closed 2 years ago

tester20000 commented 6 years ago

Hi, This is my test:

$a='<b><i>test</i></b>'; $b='<i>test</i>';

$htmlDiffConfig = new \Caxy\HtmlDiff\HtmlDiffConfig(); $htmlDiff = \Caxy\HtmlDiff\HtmlDiff::create($a, $b, $htmlDiffConfig); echo $htmlDiff->build();

result:

<i class="diffmod"> <ins class="mod"> <del class="diffmod">test</del> </i> </b> <i class="diffmod"> <ins class="mod"> <ins class="diffmod">test</ins> </i>

missing </ins>. why is there a </b>? I can't write a proper css, because there is a del tag inside an ins tag.

Please help!

SavageTiger commented 2 years ago

This could be related to https://github.com/caxy/php-htmldiff/pull/108, maybe good to retry once 0.1.14 is released.

SavageTiger commented 2 years ago

There is a really good chance that this problem is fixed in this release; https://github.com/caxy/php-htmldiff/releases/tag/v0.1.14

In case the problem persists feel free to reopen this issue or create a new one.