mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MNT Fix linting issue
This commit is contained in:
parent
603723e8f3
commit
557421a245
@ -170,8 +170,7 @@ class HtmlDiff
|
|||||||
string $oldOrNew,
|
string $oldOrNew,
|
||||||
bool $lookForTag,
|
bool $lookForTag,
|
||||||
string $value
|
string $value
|
||||||
): void
|
): void {
|
||||||
{
|
|
||||||
$alreadyMidBlock = $openTagsInBlock[$oldOrNew] > 0;
|
$alreadyMidBlock = $openTagsInBlock[$oldOrNew] > 0;
|
||||||
$canAddTagsToBlock = $lookForTag || $alreadyMidBlock;
|
$canAddTagsToBlock = $lookForTag || $alreadyMidBlock;
|
||||||
|
|
||||||
|
@ -131,32 +131,32 @@ class HtmlDiffTest extends SapphireTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
$from = '<table>
|
$from = '<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="blah">
|
<tr class="blah">
|
||||||
<td colspan="2">Row 1</td>
|
<td colspan="2">Row 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="foo">
|
<tr class="foo">
|
||||||
<td>Row 2</td>
|
<td>Row 2</td>
|
||||||
<td>Row 2</td>
|
<td>Row 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Row 3</td>
|
<td>Row 3</td>
|
||||||
<td>Row 3</td>
|
<td>Row 3</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>';
|
</table>';
|
||||||
|
|
||||||
$to = '<table class="new-class">
|
$to = '<table class="new-class">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="blah">
|
<tr class="blah">
|
||||||
<td colspan="2">Row 1</td>
|
<td colspan="2">Row 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="foo">
|
<tr class="foo">
|
||||||
<td>Row 2</td>
|
<td>Row 2</td>
|
||||||
<td>Row 2</td>
|
<td>Row 2</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>';
|
</table>';
|
||||||
|
|
||||||
$expected = '<del>' . $from . '</del>' . '<ins>' . $to . '</ins>';
|
$expected = '<del>' . $from . '</del>' . '<ins>' . $to . '</ins>';
|
||||||
$compare = HtmlDiff::compareHtml($from, $to);
|
$compare = HtmlDiff::compareHtml($from, $to);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user