mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-30 04:39:03 +01:00
Fix some pseudo bugs.
This commit is contained in:
parent
0a0f7837b0
commit
64e4954656
@ -280,6 +280,7 @@ class Parser {
|
|||||||
var couldBeSelector =
|
var couldBeSelector =
|
||||||
postColonWhitespace.isEmpty && _lookingAtInterpolatedIdentifier();
|
postColonWhitespace.isEmpty && _lookingAtInterpolatedIdentifier();
|
||||||
|
|
||||||
|
var beforeDeclaration = _scanner.state;
|
||||||
Expression value;
|
Expression value;
|
||||||
try {
|
try {
|
||||||
value = _declarationExpression();
|
value = _declarationExpression();
|
||||||
@ -298,6 +299,7 @@ class Parser {
|
|||||||
|
|
||||||
// If the value would be followed by a semicolon, it's definitely supposed
|
// If the value would be followed by a semicolon, it's definitely supposed
|
||||||
// to be a property, not a selector.
|
// to be a property, not a selector.
|
||||||
|
_scanner.state = beforeDeclaration;
|
||||||
var additional = _almostAnyValue();
|
var additional = _almostAnyValue();
|
||||||
if (_scanner.peekChar() == $semicolon) rethrow;
|
if (_scanner.peekChar() == $semicolon) rethrow;
|
||||||
|
|
||||||
|
@ -319,8 +319,8 @@ class _SerializeCssVisitor extends CssVisitor {
|
|||||||
throw new UnsupportedError("$parent cannot be converted to CSS.");
|
throw new UnsupportedError("$parent cannot be converted to CSS.");
|
||||||
|
|
||||||
void visitPseudoSelector(PseudoSelector pseudo) {
|
void visitPseudoSelector(PseudoSelector pseudo) {
|
||||||
_buffer.write($colon);
|
_buffer.writeCharCode($colon);
|
||||||
if (pseudo.type == PseudoType.element) _buffer.write($colon);
|
if (pseudo.type == PseudoType.element) _buffer.writeCharCode($colon);
|
||||||
_buffer.write(pseudo.name);
|
_buffer.write(pseudo.name);
|
||||||
if (pseudo.argument == null && pseudo.selector == null) return;
|
if (pseudo.argument == null && pseudo.selector == null) return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user