Skip to content

Commit

Permalink
#1239 suggested fix for import statements getting broken when there i…
Browse files Browse the repository at this point in the history
…s no space after url() (#1240)
  • Loading branch information
aguidrevitch authored and jakubpawlowicz committed Jan 19, 2023
1 parent 576a0f0 commit 17c4a46
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reader/extract-import-url-and-media.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function extractImportUrlAndMedia(atRuleValue) {
.replace(IMPORT_PREFIX_PATTERN, '')
.trim()
.replace(URL_PREFIX_PATTERN, '(')
.replace(URL_SUFFIX_PATTERN, ')')
.replace(URL_SUFFIX_PATTERN, ') ')
.replace(QUOTE_PREFIX_PATTERN, '')
.replace(QUOTE_SUFFIX_PATTERN, '');

Expand Down
3 changes: 3 additions & 0 deletions test/fixtures/issue-1239-min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@media print{
a{display:block}
}
1 change: 1 addition & 0 deletions test/fixtures/issue-1239.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import url("./partials/comment.css")print;

0 comments on commit 17c4a46

Please sign in to comment.