Skip to content

Commit a3e2436

Browse files
committed
Be friendly with unexpected tokens between blocks
Fixes MyIntervals#70 (in lenient parsing mode)
1 parent 82ab538 commit a3e2436

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/Sabberworm/CSS/Parser.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,13 @@ private function parseList(CSSList $oList, $bIsRoot = false) {
8787
return;
8888
}
8989
} else {
90-
$oList->append($this->parseSelector());
90+
if($this->oParserSettings->bLenientParsing) {
91+
try {
92+
$oList->append($this->parseSelector());
93+
} catch (UnexpectedTokenException $e) {}
94+
} else {
95+
$oList->append($this->parseSelector());
96+
}
9197
}
9298
$this->consumeWhiteSpace();
9399
}

0 commit comments

Comments
 (0)