From 5c733e2b721774cd4062a6f8fe2ce644a9de1a70 Mon Sep 17 00:00:00 2001 From: raxbg Date: Mon, 3 Sep 2018 18:22:11 +0300 Subject: [PATCH] Suppress the end of document exception if parsing in lenient mode --- lib/Sabberworm/CSS/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sabberworm/CSS/Parser.php b/lib/Sabberworm/CSS/Parser.php index ff563ddd..1f27b93c 100644 --- a/lib/Sabberworm/CSS/Parser.php +++ b/lib/Sabberworm/CSS/Parser.php @@ -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); } }