-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
Description
$a = "<span>abcd</span>";
$b = 'abcd';
$diffConfig = new HtmlDiffConfig();
$diffConfig->setEncoding('UTF-8');
$diff = HtmlDiff::create($a, $b, $diffConfig);
$diffResult = $diff->build();
dump($diffResult);
the result is <ins class="mod">abcd</span>
But it should be same. :)
If I change it to below, except the wrong result, the close tag lost also.
$a = '<span>你好</span>';
$b = '你好';
$diffConfig = new HtmlDiffConfig();
$diffConfig->setEncoding('UTF-8');
$diff = HtmlDiff::create($a, $b, $diffConfig);
$diffResult = $diff->build();
<ins class="mod"><ins class="diffmod"></ins>你好</span>