Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve attributes order for element node (#10958)
* Preserve attributes order for element node * Add CHANGELOG * Add ...arguments in the test * Apply fisker suggestions * Simplify further
- Loading branch information
Showing
4 changed files
with
111 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#### Preserve attributes order for element node (#10958 by @dcyriller) | ||
|
||
<!-- prettier-ignore --> | ||
```handlebars | ||
{{!-- Input --}} | ||
<MyComponent | ||
{{! this is a comment for arg 1}} | ||
@arg1="hello" | ||
{{on "clik" this.modify}} | ||
@arg2="hello" | ||
{{! this is a comment for arg 3}} | ||
@arg3="hello" | ||
@arg4="hello" | ||
{{! this is a comment for arg 5}} | ||
@arg5="hello" | ||
...arguments | ||
/> | ||
{{!-- Prettier stable --}} | ||
<MyComponent | ||
@arg1="hello" | ||
@arg2="hello" | ||
@arg3="hello" | ||
@arg4="hello" | ||
@arg5="hello" | ||
...arguments | ||
{{on "clik" this.modify}} | ||
{{! this is a comment for arg 1}} | ||
{{! this is a comment for arg 3}} | ||
{{! this is a comment for arg 5}} | ||
/> | ||
{{!-- Prettier main --}} | ||
<MyComponent | ||
{{! this is a comment for arg 1}} | ||
@arg1="hello" | ||
{{on "clik" this.modify}} | ||
@arg2="hello" | ||
{{! this is a comment for arg 3}} | ||
@arg3="hello" | ||
@arg4="hello" | ||
{{! this is a comment for arg 5}} | ||
@arg5="hello" | ||
...arguments | ||
/> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<MyComponent | ||
{{! this is a comment for arg 1}} | ||
@arg1="hello" | ||
{{on "clik" this.modify}} | ||
@arg2="hello" | ||
{{! this is a comment for arg 3}} | ||
@arg3="hello" | ||
@arg4="hello" | ||
{{! this is a comment for arg 5}} | ||
@arg5="hello" | ||
...arguments | ||
/> |