Fix inline comment forcing element to break in html (#19304)

This commit is contained in:
Konv Suu authored and GitHub committed 2026-06-09 04:20:19 +08:00
1 parent 0bfc38f638
commit adeca1aea1
8 files changed
+241 -50

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#### Keep an inline comment attached to the preceding node (#19304 by @kovsu)
<!-- prettier-ignore -->
```html
<!-- Input -->
<p><b>x</b><!-- comment --></p>
<!-- Prettier stable -->
<p>
<b>x</b
><!-- comment -->
</p>
<!-- Prettier main -->
<p><b>x</b><!-- comment --></p>
```