Skip to content

Commit 5c733e2

Browse files
committed
Suppress the end of document exception if parsing in lenient mode
1 parent 8b21a4c commit 5c733e2

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
@@ -113,7 +113,7 @@ private function parseList(CSSList $oList, $bIsRoot = false) {
113113
}
114114
$this->consumeWhiteSpace();
115115
}
116-
if (!$bIsRoot) {
116+
if (!$bIsRoot && !$this->oParserSettings->bLenientParsing) {
117117
throw new SourceException("Unexpected end of document", $this->iLineNo);
118118
}
119119
}

0 commit comments

Comments
 (0)