Skip to content

Commit 1c471f9

Browse files
authored
Merge pull request MyIntervals#142 from raxbg/suppress_eof_in_lenient
Suppress "Unexpected end of document" in lenient mode
2 parents 917949b + d536cc4 commit 1c471f9

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)