Skip to content

Commit

Permalink
Fix newline separator in description
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 29, 2023
1 parent 522c7e2 commit c001601
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Parser/PhpDocParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down Expand Up @@ -287,7 +287,7 @@ private function parseOptionalDescriptionAfterDoctrineTag(TokenIterator $tokens)
}

$tokens->dropSavePoint();
$text .= "\n";
$text .= $tokens->getDetectedNewline() ?? "\n";
}

return trim($text, " \t");
Expand Down

0 comments on commit c001601

Please sign in to comment.