Skip to content

Commit 311b841

Browse files
committed
ensure singleton tags work in formatter
1 parent 2941b40 commit 311b841

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/Support/HtmlFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function formatHtml(bool|string $html): string|array|null
5050
private function closeElementWithoutClosingElement($html)
5151
{
5252
return preg_replace(
53-
'~></(?:area|base(?:font)?|br|col|command|embed|frame|hr|img|input|keygen|link|meta|param|source|track|wbr)>~',
53+
'~></(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)>~',
5454
' />',
5555
$html
5656
);

tests/fixtures/advanced-expected.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
<input type="checkbox" value="2" />
1717
</li>
1818
</ul>
19+
<span>foo<br /></span>
1920
</div>
2021
</div>

tests/fixtures/advanced.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<ul><li x-data="foobar"><input type="checkbox" value="1"></li>
1212
<li x-data="foobar"><input type="checkbox" value="2"></li>
1313
</ul>
14+
<span>foo<br></span>
1415
</div>
1516
</div>

0 commit comments

Comments
 (0)