Skip to content

Commit

Permalink
Add edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyab committed Mar 11, 2023
1 parent 3dccc3e commit 2ca6512
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/format/css/url/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ div {
src: url(foo.ttf?query=foo,bar,);
src: url(foo.woff2?foo=rgb\\(255,255,0\\));
}
a {
content: url(https://example.com/\\)\\).jpg);
content: url(https://example.com/\\(\\(.jpg);
content: url(https://example.com/\\ \\ .jpg);
}
=====================================output=====================================
div {
background: url(/images/bg.png);
Expand All @@ -34,5 +40,11 @@ div {
src: url(foo.woff2?foo=rgb\\(255,255,0\\));
}
a {
content: url(https://example.com/\\)\\).jpg);
content: url(https://example.com/\\(\\(.jpg);
content: url(https://example.com/\\ \\ .jpg);
}
================================================================================
`;
6 changes: 6 additions & 0 deletions tests/format/css/url/url.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ div {
@font-face {
src: url(foo.ttf?query=foo,bar,);
src: url(foo.woff2?foo=rgb\(255,255,0\));
}

a {
content: url(https://example.com/\)\).jpg);
content: url(https://example.com/\(\(.jpg);
content: url(https://example.com/\ \ .jpg);
}

0 comments on commit 2ca6512

Please sign in to comment.