-
-
Notifications
You must be signed in to change notification settings - Fork 541
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
- Loading branch information
Showing
6 changed files
with
126 additions
and
9 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
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
35 changes: 35 additions & 0 deletions
35
...ome_html_formatter/tests/specs/html/elements/inline/tags-dont-hug-content-2.html.snap.new
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,35 @@ | ||
--- | ||
source: crates/biome_formatter_test/src/snapshot_builder.rs | ||
assertion_line: 211 | ||
info: elements/inline/tags-dont-hug-content-2.html | ||
--- | ||
# Input | ||
|
||
```html | ||
<b> | ||
asdfasdf foo bar things much more longer things lorem ipsum or something idk i put pineapple in strombolis | ||
</b> | ||
|
||
``` | ||
|
||
|
||
============================= | ||
|
||
# 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 | ||
<b></b> | ||
``` |
33 changes: 33 additions & 0 deletions
33
...biome_html_formatter/tests/specs/html/elements/inline/tags-dont-hug-content.html.snap.new
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,33 @@ | ||
--- | ||
source: crates/biome_formatter_test/src/snapshot_builder.rs | ||
assertion_line: 211 | ||
info: elements/inline/tags-dont-hug-content.html | ||
--- | ||
# Input | ||
|
||
```html | ||
<b> asdfasdf foo bar things much more longer things lorem ipsum or something idk i put pineapple in strombolis </b> | ||
|
||
``` | ||
|
||
|
||
============================= | ||
|
||
# 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 | ||
<b></b> | ||
``` |
33 changes: 33 additions & 0 deletions
33
crates/biome_html_formatter/tests/specs/html/long-content.html.snap.new
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,33 @@ | ||
--- | ||
source: crates/biome_formatter_test/src/snapshot_builder.rs | ||
assertion_line: 211 | ||
info: long-content.html | ||
--- | ||
# Input | ||
|
||
```html | ||
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed dapibus velit non justo tempus pretium. Praesent orci lorem, pellentesque sit amet ullamcorper sed, consectetur quis odio. In felis nulla, pellentesque a dolor eget, semper vestibulum nisi. Sed imperdiet dui a massa placerat ullamcorper. Praesent eleifend purus eget arcu faucibus, ac fringilla nulla aliquet. Aliquam id accumsan libero. Duis efficitur nisi quis massa mollis ultricies. Sed condimentum sit amet urna in cursus. Ut id tortor vestibulum, mollis enim sed, ornare ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut nec dapibus est. Maecenas orci purus, blandit eu faucibus eu, lacinia id turpis.</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></div> | ||
``` |