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,
|
||||
bool $lookForTag,
|
||||
string $value
|
||||
): void
|
||||
{
|
||||
): void {
|
||||
$alreadyMidBlock = $openTagsInBlock[$oldOrNew] > 0;
|
||||
$canAddTagsToBlock = $lookForTag || $alreadyMidBlock;
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user