Properly inspect singleton lists.

This commit is contained in:
Natalie Weizenbaum 2016-10-18 16:38:28 -07:00
parent 794bdee476
commit acb3b3712d

View File

@ -297,6 +297,11 @@ class _SerializeCssVisitor
return;
}
var singleton = _inspect &&
value.contents.length == 1 &&
value.separator == ListSeparator.comma;
if (singleton) _buffer.writeCharCode($lparen);
_writeBetween(
_inspect
? value.contents
@ -311,6 +316,11 @@ class _SerializeCssVisitor
}
: (element) => element.accept(this));
if (singleton) {
_buffer.writeCharCode($comma);
_buffer.writeCharCode($rparen);
}
if (value.hasBrackets) _buffer.writeCharCode($rbracket);
}