Skip to content

Commit

Permalink
Merge pull request #142 from raxbg/suppress_eof_in_lenient
Browse files Browse the repository at this point in the history
Suppress "Unexpected end of document" in lenient mode
  • Loading branch information
sabberworm authored Sep 4, 2018
2 parents 917949b + d536cc4 commit 1c471f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Sabberworm/CSS/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private function parseList(CSSList $oList, $bIsRoot = false) {
}
$this->consumeWhiteSpace();
}
if (!$bIsRoot) {
if (!$bIsRoot && !$this->oParserSettings->bLenientParsing) {
throw new SourceException("Unexpected end of document", $this->iLineNo);
}
}
Expand Down

0 comments on commit 1c471f9

Please sign in to comment.