From 9edb2bb4473e6c0046d1bac8ae95a6c4aacf16c9 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Sun, 23 Oct 2016 17:17:14 -0700 Subject: [PATCH] Fix a selector parsing bug. --- lib/src/parse/stylesheet.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/parse/stylesheet.dart b/lib/src/parse/stylesheet.dart index a3534e58..c0e2556a 100644 --- a/lib/src/parse/stylesheet.dart +++ b/lib/src/parse/stylesheet.dart @@ -209,7 +209,10 @@ abstract class StylesheetParser extends Parser { var midBuffer = new StringBuffer(); midBuffer.write(rawText(whitespace)); - if (!scanner.scanChar($colon)) return nameBuffer; + if (!scanner.scanChar($colon)) { + if (midBuffer.isNotEmpty) nameBuffer.writeCharCode($space); + return nameBuffer; + } midBuffer.writeCharCode($colon); // Parse custom properties as declarations no matter what.