Skip to content

Commit c001601

Browse files
committed
Fix newline separator in description
1 parent 522c7e2 commit c001601

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Parser/PhpDocParser.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ private function parseText(TokenIterator $tokens): Ast\PhpDoc\PhpDocTextNode
230230
}
231231

232232
$tokens->dropSavePoint();
233-
$text .= "\n";
233+
$text .= $tokens->getDetectedNewline() ?? "\n";
234234
}
235235

236236
return new Ast\PhpDoc\PhpDocTextNode(trim($text, " \t"));
@@ -287,7 +287,7 @@ private function parseOptionalDescriptionAfterDoctrineTag(TokenIterator $tokens)
287287
}
288288

289289
$tokens->dropSavePoint();
290-
$text .= "\n";
290+
$text .= $tokens->getDetectedNewline() ?? "\n";
291291
}
292292

293293
return trim($text, " \t");

0 commit comments

Comments
 (0)