-
-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(format/hml): keep at most 1 empty line between elements
- Loading branch information
Showing
13 changed files
with
271 additions
and
60 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
6 changes: 6 additions & 0 deletions
6
crates/biome_html_formatter/tests/specs/html/elements/spacing/case0.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,6 @@ | ||
text | ||
|
||
|
||
|
||
|
||
<div>foo</div> |
36 changes: 36 additions & 0 deletions
36
crates/biome_html_formatter/tests/specs/html/elements/spacing/case0.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,36 @@ | ||
--- | ||
source: crates/biome_formatter_test/src/snapshot_builder.rs | ||
info: elements/spacing/case0.html | ||
--- | ||
# Input | ||
|
||
```html | ||
text | ||
<div>foo</div> | ||
``` | ||
|
||
|
||
============================= | ||
|
||
# Outputs | ||
|
||
## Output 1 | ||
|
||
----- | ||
Indent style: Tab | ||
Indent width: 2 | ||
Line ending: LF | ||
Line width: 80 | ||
Attribute Position: Auto | ||
----- | ||
|
||
```html | ||
text | ||
<div>foo</div> | ||
``` |
8 changes: 8 additions & 0 deletions
8
crates/biome_html_formatter/tests/specs/html/elements/spacing/case1.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,8 @@ | ||
<div> | ||
<div>foo</div> | ||
|
||
text | ||
|
||
<div>foo</div> | ||
</div> | ||
|
41 changes: 41 additions & 0 deletions
41
crates/biome_html_formatter/tests/specs/html/elements/spacing/case1.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,41 @@ | ||
--- | ||
source: crates/biome_formatter_test/src/snapshot_builder.rs | ||
info: elements/spacing/case1.html | ||
--- | ||
# Input | ||
|
||
```html | ||
<div> | ||
<div>foo</div> | ||
text | ||
<div>foo</div> | ||
</div> | ||
``` | ||
|
||
|
||
============================= | ||
|
||
# Outputs | ||
|
||
## Output 1 | ||
|
||
----- | ||
Indent style: Tab | ||
Indent width: 2 | ||
Line ending: LF | ||
Line width: 80 | ||
Attribute Position: Auto | ||
----- | ||
|
||
```html | ||
<div> | ||
<div>foo</div> | ||
text | ||
<div>foo</div> | ||
</div> | ||
``` |
6 changes: 6 additions & 0 deletions
6
crates/biome_html_formatter/tests/specs/html/elements/spacing/case2.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,6 @@ | ||
text | ||
|
||
|
||
|
||
|
||
<div>foo</div> |
36 changes: 36 additions & 0 deletions
36
crates/biome_html_formatter/tests/specs/html/elements/spacing/case2.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,36 @@ | ||
--- | ||
source: crates/biome_formatter_test/src/snapshot_builder.rs | ||
info: elements/spacing/case2.html | ||
--- | ||
# Input | ||
|
||
```html | ||
text | ||
<div>foo</div> | ||
``` | ||
|
||
|
||
============================= | ||
|
||
# Outputs | ||
|
||
## Output 1 | ||
|
||
----- | ||
Indent style: Tab | ||
Indent width: 2 | ||
Line ending: LF | ||
Line width: 80 | ||
Attribute Position: Auto | ||
----- | ||
|
||
```html | ||
text | ||
<div>foo</div> | ||
``` |
6 changes: 6 additions & 0 deletions
6
crates/biome_html_formatter/tests/specs/html/elements/spacing/case3.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,6 @@ | ||
<!-- foo --> | ||
<!-- foo --> | ||
|
||
|
||
|
||
test |
43 changes: 43 additions & 0 deletions
43
crates/biome_html_formatter/tests/specs/html/elements/spacing/case3.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,43 @@ | ||
--- | ||
source: crates/biome_formatter_test/src/snapshot_builder.rs | ||
info: elements/spacing/case3.html | ||
--- | ||
# Input | ||
|
||
```html | ||
<!-- foo --> | ||
<!-- foo --> | ||
test | ||
``` | ||
|
||
|
||
============================= | ||
|
||
# Outputs | ||
|
||
## Output 1 | ||
|
||
----- | ||
Indent style: Tab | ||
Indent width: 2 | ||
Line ending: LF | ||
Line width: 80 | ||
Attribute Position: Auto | ||
----- | ||
|
||
```html | ||
<!-- foo --> | ||
<!-- foo --> | ||
test | ||
``` | ||
|
||
|
||
|
||
## Unimplemented nodes/tokens | ||
|
||
"<!-- foo -->" => 0..12 | ||
"<!-- foo -->\n" => 13..26 |
3 changes: 3 additions & 0 deletions
3
crates/biome_html_formatter/tests/specs/html/elements/spacing/case4.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,3 @@ | ||
foo | ||
|
||
bar |
31 changes: 31 additions & 0 deletions
31
crates/biome_html_formatter/tests/specs/html/elements/spacing/case4.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,31 @@ | ||
--- | ||
source: crates/biome_formatter_test/src/snapshot_builder.rs | ||
info: elements/spacing/case4.html | ||
--- | ||
# Input | ||
|
||
```html | ||
foo | ||
bar | ||
``` | ||
|
||
|
||
============================= | ||
|
||
# Outputs | ||
|
||
## Output 1 | ||
|
||
----- | ||
Indent style: Tab | ||
Indent width: 2 | ||
Line ending: LF | ||
Line width: 80 | ||
Attribute Position: Auto | ||
----- | ||
|
||
```html | ||
foo bar | ||
``` |
Oops, something went wrong.