Skip to content

Commit d8fd8dc

Browse files
committed
Silently discard unopen closing brackets in lenient mode
1 parent c3b01ef commit d8fd8dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sabberworm/CSS/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private function parseListItem(CSSList $oList, $bIsRoot = false) {
129129
return $oAtRule;
130130
} else if ($this->comes('}')) {
131131
$this->consume('}');
132-
if ($bIsRoot) {
132+
if ($bIsRoot && !$this->oParserSettings->bLenientParsing) {
133133
throw new SourceException("Unopened {", $this->iLineNo);
134134
} else {
135135
return null;

0 commit comments

Comments
 (0)