Skip to content

Commit 48e99f6

Browse files
committed
Replace assumption with certainty for EOF when consuming white space
1 parent 901cda1 commit 48e99f6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/Sabberworm/CSS/Parsing/ParserState.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ public function consumeWhiteSpace() {
119119
if($this->oParserSettings->bLenientParsing) {
120120
try {
121121
$oComment = $this->consumeComment();
122-
} catch(UnexpectedTokenException $e) {
123-
// When we can’t find the end of a comment, we assume the document is finished.
122+
} catch(UnexpectedEOFException $e) {
124123
$this->iCurrentPosition = $this->iLength;
125124
return;
126125
}

0 commit comments

Comments
 (0)