diff --git a/composer.json b/composer.json index 701385fd..875e158e 100644 --- a/composer.json +++ b/composer.json @@ -25,12 +25,12 @@ "homepage": "https://github.com/doctrine/rst-parser", "require": { "php": "^7.2 || ^8.0", - "doctrine/event-manager": "^1.0", + "doctrine/event-manager": "^1.0 || ^2.0", "symfony/filesystem": "^4.1 || ^5.0 || ^6.0", "symfony/finder": "^4.1 || ^5.0 || ^6.0", "symfony/polyfill-mbstring": "^1.0", "symfony/string": "^5.3 || ^6.0", - "symfony/translation-contracts": "^1.1 || ^2.0", + "symfony/translation-contracts": "^1.1 || ^2.0 || ^3.0", "twig/twig": "^2.9 || ^3.3" }, "require-dev": { diff --git a/lib/Parser/DocumentParser.php b/lib/Parser/DocumentParser.php index 015544bc..459df2e6 100644 --- a/lib/Parser/DocumentParser.php +++ b/lib/Parser/DocumentParser.php @@ -450,10 +450,10 @@ private function parseLine(string $line): bool $this->setState(State::BEGIN); return false; - } else { - $this->buffer->push($line); } + $this->buffer->push($line); + break; case State::DIRECTIVE: