Skip to content

Commit

Permalink
fix: fix extra whitespaces before functions (fix #14)
Browse files Browse the repository at this point in the history
  • Loading branch information
g-plane committed Oct 14, 2024
1 parent 358ff8d commit 33c3d26
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion malva/src/doc_gen/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl<'s> DocGen<'s> for Declaration<'s> {
} else if matches!(
self.value.get(index - 1),
Some(ComponentValue::Delimiter(Delimiter {
kind: DelimiterKind::Solidus,
kind: DelimiterKind::Solidus | DelimiterKind::Comma,
..
}))
) {
Expand Down
4 changes: 4 additions & 0 deletions malva/tests/fmt/css/functions/functions.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@font-face {
src: url('./libertinus-7.050/LibertinusSerif-Regular.woff2') format('woff2'), local(Libertinus Serif), local(Libertinus Serif Regular), local(Libertinus);
src: local(Libertinus Serif), local(Libertinus Serif Regular), local(Libertinus), url('./libertinus-7.050/LibertinusSerif-Regular.woff2') format('woff2');
}
15 changes: 15 additions & 0 deletions malva/tests/fmt/css/functions/functions.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
source: malva/tests/fmt.rs
---
@font-face {
src:
url("./libertinus-7.050/LibertinusSerif-Regular.woff2") format("woff2"),
local(Libertinus Serif),
local(Libertinus Serif Regular),
local(Libertinus);
src:
local(Libertinus Serif),
local(Libertinus Serif Regular),
local(Libertinus),
url("./libertinus-7.050/LibertinusSerif-Regular.woff2") format("woff2");
}

0 comments on commit 33c3d26

Please sign in to comment.