Skip to content

Commit

Permalink
Properly join, and invoke indent correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
tabatkins committed May 23, 2023
1 parent 9dac9e8 commit 48d63c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions parse-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ class Stylesheet extends CSSParserRule {
}
}
toSource() {
return this.rules.map(x=>x.toSource({indent:0})).join("\n");
return this.rules.map(x=>x.toSource()).join("\n");
}
}

Expand All @@ -1321,7 +1321,7 @@ class AtRule extends CSSParserRule {
}
toSource(indent=0) {
let s = printIndent(indent) + "@" + escapeIdent(this.name);
s += this.prelude.map(x=>x.toSource());
s += this.prelude.map(x=>x.toSource()).join("");
if(this.declarations == null) {
s += ";\n";
return s;
Expand Down Expand Up @@ -1356,7 +1356,7 @@ class QualifiedRule extends CSSParserRule {
}
toSource(indent=0) {
let s = printIndent(indent);
s += this.prelude.map(x=>x.toSource());
s += this.prelude.map(x=>x.toSource()).join("");
if(this.declarations == null) {
s += ";\n";
return s;
Expand Down Expand Up @@ -1393,7 +1393,7 @@ class Declaration extends CSSParserRule {
let s = printIndent(indent) + escapeIdent(this.name) + ": ";
s += this.value.map(x=>x.toSource()).join("");
if(this.important) {
s += " !important";
s += "!important";
}
s += ";";
return s;
Expand Down

0 comments on commit 48d63c6

Please sign in to comment.