From 559574b4923e586d9e41dfb2b57a9c924bf58ef8 Mon Sep 17 00:00:00 2001 From: Michael Ochmann Date: Thu, 18 Aug 2022 14:32:16 +0200 Subject: [PATCH] fixed endless loop when blockquote had not empty line after --- src/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Parser.php b/src/Parser.php index 6948b11..8368750 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -468,7 +468,7 @@ class Parser { } $buffer = ""; $elm = $this->document->createElement("blockquote", $buffer); - while (!($this->current()->type === TokenType::EOL && $this->next()->type !== TokenType::GT)) { + while (!($this->current()->type === TokenType::EOF) && !($this->current()->type === TokenType::EOL && $this->next()->type !== TokenType::GT)) { $gt = $this->consume(); if ($this->current()->type === TokenType::EOL) { $this->consume();