Skip to content

Commit

Permalink
Allow "!" in custom property values (#266)
Browse files Browse the repository at this point in the history
Closes #260
  • Loading branch information
nex3 committed Mar 23, 2018
1 parent 5cc3238 commit 4c293f3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.0.0-rc.2

* Allow `!` in custom property values ([#260][]).

[#260]: https://github.com/sass/dart-sass/issues/260

## 1.0.0-rc.1

* Add support for importing an `_index.scss` or `_index.sass` file when
Expand Down
3 changes: 1 addition & 2 deletions lib/src/parse/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ abstract class Parser {
return buffer.toString();
}

/// Consumes tokens until it reaches a top-level `":"`, `"!"`, `")"`, `"]"`,
/// Consumes tokens until it reaches a top-level `":"`, `")"`, `"]"`,
/// or `"}"` and returns their contents as a string.
@protected
String declarationValue() {
Expand Down Expand Up @@ -270,7 +270,6 @@ abstract class Parser {
wroteNewline = false;
break;

case $exclamation:
case $semicolon:
if (brackets.isEmpty) break loop;
buffer.writeCharCode(scanner.readChar());
Expand Down
3 changes: 1 addition & 2 deletions lib/src/parse/stylesheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2309,7 +2309,7 @@ abstract class StylesheetParser extends Parser {
return buffer.interpolation(scanner.spanFrom(start));
}

/// Consumes tokens until it reaches a top-level `":"`, `"!"`, `")"`, `"]"`,
/// Consumes tokens until it reaches a top-level `":"`, `")"`, `"]"`,
/// or `"}"` and returns their contents as a string.
///
/// Unlike [declarationValue], this allows interpolation.
Expand Down Expand Up @@ -2392,7 +2392,6 @@ abstract class StylesheetParser extends Parser {
wroteNewline = false;
break;

case $exclamation:
case $semicolon:
if (brackets.isEmpty) break loop;
buffer.writeCharCode(scanner.readChar());
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass
version: 1.0.0-rc.1
version: 1.0.0-dev
description: A Sass implementation in Dart.
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/sass/dart-sass
Expand Down

0 comments on commit 4c293f3

Please sign in to comment.