diff --git a/CHANGELOG.md b/CHANGELOG.md index e86b28e7..40bb04bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ * Support interpolation in loud comments. +* Fix a bug where even valid semicolons and exclamation marks in custom property + values were disallowed. + * Disallow invalid function names. * Support terse mixin syntax in the indented syntax. diff --git a/lib/src/parse/parser.dart b/lib/src/parse/parser.dart index c8a75594..da1434da 100644 --- a/lib/src/parse/parser.dart +++ b/lib/src/parse/parser.dart @@ -230,7 +230,9 @@ abstract class Parser { case $exclamation: case $semicolon: - break loop; + if (brackets.isEmpty) break loop; + buffer.writeCharCode(scanner.readChar()); + break; case $u: case $U: diff --git a/lib/src/parse/stylesheet.dart b/lib/src/parse/stylesheet.dart index 170034ef..97dda6dd 100644 --- a/lib/src/parse/stylesheet.dart +++ b/lib/src/parse/stylesheet.dart @@ -2289,7 +2289,9 @@ abstract class StylesheetParser extends Parser { case $exclamation: case $semicolon: - break loop; + if (brackets.isEmpty) break loop; + buffer.writeCharCode(scanner.readChar()); + break; case $u: case $U: