Skip to content

Commit

Permalink
[Windows] Support replace \r\n on DocBlockInliner (#5513)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik authored Jan 28, 2024
1 parent 1b4395c commit c5d4a78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/BetterPhpDocParser/Printer/DocBlockInliner.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ final class DocBlockInliner
{
/**
* @var string
* @see https://regex101.com/r/Mjb0qi/1
* @see https://regex101.com/r/Mjb0qi/3
*/
private const NEWLINE_CLOSING_DOC_REGEX = "#\n \*\/$#";
private const NEWLINE_CLOSING_DOC_REGEX = "#(?:\r\n|\n) \*\/$#";

/**
* @var string
* @see https://regex101.com/r/U5OUV4/2
* @see https://regex101.com/r/U5OUV4/4
*/
private const NEWLINE_MIDDLE_DOC_REGEX = "#\n \* #";
private const NEWLINE_MIDDLE_DOC_REGEX = "#(?:\r\n|\n) \* #";

public function inline(string $docContent): string
{
Expand Down

0 comments on commit c5d4a78

Please sign in to comment.