MNT Fix linting issue

This commit is contained in:
Guy Sartorelli 2023-02-02 13:10:24 +13:00
parent 603723e8f3
commit 557421a245
No known key found for this signature in database
GPG Key ID: F313E3B9504D496A
2 changed files with 25 additions and 26 deletions

View File

@ -170,8 +170,7 @@ class HtmlDiff
string $oldOrNew,
bool $lookForTag,
string $value
): void
{
): void {
$alreadyMidBlock = $openTagsInBlock[$oldOrNew] > 0;
$canAddTagsToBlock = $lookForTag || $alreadyMidBlock;

View File

@ -131,32 +131,32 @@ class HtmlDiffTest extends SapphireTest
}
$from = '<table>
<tbody>
<tr class="blah">
<td colspan="2">Row 1</td>
</tr>
<tr class="foo">
<td>Row 2</td>
<td>Row 2</td>
</tr>
<tr>
<td>Row 3</td>
<td>Row 3</td>
</tr>
</tbody>
</table>';
<tbody>
<tr class="blah">
<td colspan="2">Row 1</td>
</tr>
<tr class="foo">
<td>Row 2</td>
<td>Row 2</td>
</tr>
<tr>
<td>Row 3</td>
<td>Row 3</td>
</tr>
</tbody>
</table>';
$to = '<table class="new-class">
<tbody>
<tr class="blah">
<td colspan="2">Row 1</td>
</tr>
<tr class="foo">
<td>Row 2</td>
<td>Row 2</td>
</tr>
</tbody>
</table>';
<tbody>
<tr class="blah">
<td colspan="2">Row 1</td>
</tr>
<tr class="foo">
<td>Row 2</td>
<td>Row 2</td>
</tr>
</tbody>
</table>';
$expected = '<del>' . $from . '</del>' . '<ins>' . $to . '</ins>';
$compare = HtmlDiff::compareHtml($from, $to);