@@ -83,10 +83,8 @@ private static function parseListItem(ParserState $oParserState, CSSList $oList)
83
83
}
84
84
return $ oAtRule ;
85
85
} else if ($ oParserState ->comes ('} ' )) {
86
- $ oParserState ->consume ('} ' );
87
86
if ($ bIsRoot ) {
88
87
if ($ oParserState ->getSettings ()->bLenientParsing ) {
89
- while ($ oParserState ->comes ('} ' )) $ oParserState ->consume ('} ' );
90
88
return DeclarationBlock::parse ($ oParserState );
91
89
} else {
92
90
throw new SourceException ("Unopened { " , $ oParserState ->currentLine ());
@@ -123,6 +121,9 @@ private static function parseAtRule(ParserState $oParserState) {
123
121
$ oResult ->setVendorKeyFrame ($ sIdentifier );
124
122
$ oResult ->setAnimationName (trim ($ oParserState ->consumeUntil ('{ ' , false , true )));
125
123
CSSList::parseList ($ oParserState , $ oResult );
124
+ if ($ oParserState ->comes ('} ' )) {
125
+ $ oParserState ->consume ('} ' );
126
+ }
126
127
return $ oResult ;
127
128
} else if ($ sIdentifier === 'namespace ' ) {
128
129
$ sPrefix = null ;
@@ -162,6 +163,9 @@ private static function parseAtRule(ParserState $oParserState) {
162
163
} else {
163
164
$ oAtRule = new AtRuleBlockList ($ sIdentifier , $ sArgs , $ iIdentifierLineNum );
164
165
CSSList::parseList ($ oParserState , $ oAtRule );
166
+ if ($ oParserState ->comes ('} ' )) {
167
+ $ oParserState ->consume ('} ' );
168
+ }
165
169
}
166
170
return $ oAtRule ;
167
171
}
0 commit comments