-
-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(format/html): make element children break if attributes break (#5027
- Loading branch information
Showing
5 changed files
with
91 additions
and
12 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
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
5 changes: 5 additions & 0 deletions
5
crates/biome_html_formatter/tests/specs/html/content-breaks-when-attr-breaks.html
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,5 @@ | ||
<div | ||
test="content must break if attributes break" | ||
explanation="This group of attributes should break and become multiline." | ||
details="The content must do the same, despite it being short." | ||
>short content</div> |
42 changes: 42 additions & 0 deletions
42
crates/biome_html_formatter/tests/specs/html/content-breaks-when-attr-breaks.html.snap
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,42 @@ | ||
--- | ||
source: crates/biome_formatter_test/src/snapshot_builder.rs | ||
info: content-breaks-when-attr-breaks.html | ||
--- | ||
# Input | ||
|
||
```html | ||
<div | ||
test="content must break if attributes break" | ||
explanation="This group of attributes should break and become multiline." | ||
details="The content must do the same, despite it being short." | ||
>short content</div> | ||
``` | ||
|
||
|
||
============================= | ||
|
||
# Outputs | ||
|
||
## Output 1 | ||
|
||
----- | ||
Indent style: Tab | ||
Indent width: 2 | ||
Line ending: LF | ||
Line width: 80 | ||
Attribute Position: Auto | ||
Bracket same line: false | ||
Whitespace sensitivity: css | ||
Indent script and style: false | ||
----- | ||
|
||
```html | ||
<div | ||
test="content must break if attributes break" | ||
explanation="This group of attributes should break and become multiline." | ||
details="The content must do the same, despite it being short." | ||
> | ||
short content | ||
</div> | ||
``` |
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