Support format html event attributes (#17909)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
authored and GitHub committed 2025-09-24 01:29:56 +08:00
1 parent b7b2b0d434
commit 72cfa18a42
15 files changed
+291 -38

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
#### Format inline event handler (#17909 by @kovsu)
<!-- prettier-ignore -->
```html
<!-- Input -->
<button
type="button"
onclick="console .log( 'Hello, this is my old-fashioned event handler!')"
>Press me</button>
<!-- Prettier stable -->
<button
type="button"
onclick="console .log( 'Hello, this is my old-fashioned event handler!')"
>
Press me
</button>
<!-- Prettier main -->
<button
type="button"
onclick="console.log('Hello, this is my old-fashioned event handler!')"
>
Press me
</button>
```