-
-
Notifications
You must be signed in to change notification settings - Fork 527
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): enforce whitespace sensitivity for siblings in Html…
…ElementList (#5025) Co-authored-by: Emanuele Stoppa <[email protected]>
- Loading branch information
Showing
4 changed files
with
135 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
14 changes: 14 additions & 0 deletions
14
crates/biome_html_formatter/tests/specs/html/long-inline-elements.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,14 @@ | ||
Lorem ipsum<span />dolor sit amet, consectetur adipiscing elit. Sed eu diam vel | ||
sem congue pulvinar at vitae purus. Morbi volutpat arcu massa, eu laoreet eros | ||
feugiat ac.<b | ||
attribute="really long for this example" | ||
actually="so long it should break and become multiline" | ||
>Etiam sit amet turpis blandit, volutpat magna nec, luctus justo. Nam nec | ||
augue mauris. Nullam sit amet blandit massa, at finibus felis. Nunc ut | ||
vestibulum nulla.</b | ||
>Donec maximus euismod egestas. Sed tempus semper efficitur. Suspendisse maximus | ||
ut risus vel sollicitudin. Maecenas eu bibendum lorem.<span | ||
attribute="really long for this example" | ||
actually="so long it should break and become multiline" | ||
/>Sed porttitor commodo commodo. Morbi luctus consequat maximus. Vestibulum | ||
viverra libero quis lacus euismod, ut consequat ante convallis. |
58 changes: 58 additions & 0 deletions
58
crates/biome_html_formatter/tests/specs/html/long-inline-elements.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,58 @@ | ||
--- | ||
source: crates/biome_formatter_test/src/snapshot_builder.rs | ||
info: long-inline-elements.html | ||
--- | ||
# Input | ||
|
||
```html | ||
Lorem ipsum<span />dolor sit amet, consectetur adipiscing elit. Sed eu diam vel | ||
sem congue pulvinar at vitae purus. Morbi volutpat arcu massa, eu laoreet eros | ||
feugiat ac.<b | ||
attribute="really long for this example" | ||
actually="so long it should break and become multiline" | ||
>Etiam sit amet turpis blandit, volutpat magna nec, luctus justo. Nam nec | ||
augue mauris. Nullam sit amet blandit massa, at finibus felis. Nunc ut | ||
vestibulum nulla.</b | ||
>Donec maximus euismod egestas. Sed tempus semper efficitur. Suspendisse maximus | ||
ut risus vel sollicitudin. Maecenas eu bibendum lorem.<span | ||
attribute="really long for this example" | ||
actually="so long it should break and become multiline" | ||
/>Sed porttitor commodo commodo. Morbi luctus consequat maximus. Vestibulum | ||
viverra libero quis lacus euismod, ut consequat ante convallis. | ||
``` | ||
============================= | ||
# 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 | ||
Lorem ipsum<span />dolor sit amet, consectetur adipiscing elit. Sed eu diam vel | ||
sem congue pulvinar at vitae purus. Morbi volutpat arcu massa, eu laoreet eros | ||
feugiat ac.<b | ||
attribute="really long for this example" | ||
actually="so long it should break and become multiline" | ||
>Etiam sit amet turpis blandit, volutpat magna nec, luctus justo. Nam nec | ||
augue mauris. Nullam sit amet blandit massa, at finibus felis. Nunc ut | ||
vestibulum nulla.</b | ||
>Donec maximus euismod egestas. Sed tempus semper efficitur. Suspendisse maximus | ||
ut risus vel sollicitudin. Maecenas eu bibendum lorem.<span | ||
attribute="really long for this example" | ||
actually="so long it should break and become multiline" | ||
/>Sed porttitor commodo commodo. Morbi luctus consequat maximus. Vestibulum | ||
viverra libero quis lacus euismod, ut consequat ante convallis. | ||
``` |