-
-
Notifications
You must be signed in to change notification settings - Fork 482
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): keep single quotes if string contains a double quote
- Loading branch information
Showing
4 changed files
with
52 additions
and
13 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
1 change: 1 addition & 0 deletions
1
crates/biome_html_formatter/tests/specs/attributes-single-quotes.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 @@ | ||
<img src='foo.png' alt='should keep "these" quotes' /> |
28 changes: 28 additions & 0 deletions
28
crates/biome_html_formatter/tests/specs/attributes-single-quotes.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,28 @@ | ||
--- | ||
source: crates/biome_formatter_test/src/snapshot_builder.rs | ||
info: attributes-single-quotes.html | ||
--- | ||
# Input | ||
|
||
```html | ||
<img src='foo.png' alt='should keep "these" quotes' /> | ||
``` | ||
|
||
|
||
============================= | ||
|
||
# Outputs | ||
|
||
## Output 1 | ||
|
||
----- | ||
Indent style: Tab | ||
Indent width: 2 | ||
Line ending: LF | ||
Line width: 80 | ||
Attribute Position: Auto | ||
----- | ||
|
||
```html | ||
<img src="foo.png" alt='should keep "these" quotes' />``` |