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:
15 files changed
+291
-38
No files matched your search
@@ -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>
|
||||
```
|
||||
Reference in new issue
Block a user