From 9b183ed32c274ab1d0974f00b57d706f12a65dd2 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 29 Aug 2016 22:53:09 -0700 Subject: [PATCH] Clean up output of childless rules. --- lib/src/visitor/serialize.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/visitor/serialize.dart b/lib/src/visitor/serialize.dart index 7d654226..7e83cae1 100644 --- a/lib/src/visitor/serialize.dart +++ b/lib/src/visitor/serialize.dart @@ -376,6 +376,11 @@ class _SerializeCssVisitor void _visitChildren(Iterable children) { _buffer.writeCharCode($lbrace); + if (children.isEmpty) { + _buffer.writeCharCode($rbrace); + return; + } + _buffer.writeln(); _indent(() { for (var child in children) {