Skip to content

Commit 48d63c6

Browse files
committed
Properly join, and invoke indent correctly.
1 parent 9dac9e8 commit 48d63c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

parse-css.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ class Stylesheet extends CSSParserRule {
12971297
}
12981298
}
12991299
toSource() {
1300-
return this.rules.map(x=>x.toSource({indent:0})).join("\n");
1300+
return this.rules.map(x=>x.toSource()).join("\n");
13011301
}
13021302
}
13031303

@@ -1321,7 +1321,7 @@ class AtRule extends CSSParserRule {
13211321
}
13221322
toSource(indent=0) {
13231323
let s = printIndent(indent) + "@" + escapeIdent(this.name);
1324-
s += this.prelude.map(x=>x.toSource());
1324+
s += this.prelude.map(x=>x.toSource()).join("");
13251325
if(this.declarations == null) {
13261326
s += ";\n";
13271327
return s;
@@ -1356,7 +1356,7 @@ class QualifiedRule extends CSSParserRule {
13561356
}
13571357
toSource(indent=0) {
13581358
let s = printIndent(indent);
1359-
s += this.prelude.map(x=>x.toSource());
1359+
s += this.prelude.map(x=>x.toSource()).join("");
13601360
if(this.declarations == null) {
13611361
s += ";\n";
13621362
return s;
@@ -1393,7 +1393,7 @@ class Declaration extends CSSParserRule {
13931393
let s = printIndent(indent) + escapeIdent(this.name) + ": ";
13941394
s += this.value.map(x=>x.toSource()).join("");
13951395
if(this.important) {
1396-
s += " !important";
1396+
s += "!important";
13971397
}
13981398
s += ";";
13991399
return s;

0 commit comments

Comments
 (0)