From c001601c3e394ecde018c4b93aca55949ff437d4 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Tue, 27 Jun 2023 22:08:03 +0200 Subject: [PATCH] Fix newline separator in description --- src/Parser/PhpDocParser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Parser/PhpDocParser.php b/src/Parser/PhpDocParser.php index 33d68968..c92b8093 100644 --- a/src/Parser/PhpDocParser.php +++ b/src/Parser/PhpDocParser.php @@ -230,7 +230,7 @@ private function parseText(TokenIterator $tokens): Ast\PhpDoc\PhpDocTextNode } $tokens->dropSavePoint(); - $text .= "\n"; + $text .= $tokens->getDetectedNewline() ?? "\n"; } return new Ast\PhpDoc\PhpDocTextNode(trim($text, " \t")); @@ -287,7 +287,7 @@ private function parseOptionalDescriptionAfterDoctrineTag(TokenIterator $tokens) } $tokens->dropSavePoint(); - $text .= "\n"; + $text .= $tokens->getDetectedNewline() ?? "\n"; } return trim($text, " \t");