From c5d4a78df1fe7ad674631f7373e127ff75eae896 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Mon, 29 Jan 2024 01:50:53 +0700 Subject: [PATCH] [Windows] Support replace \r\n on DocBlockInliner (#5513) --- src/BetterPhpDocParser/Printer/DocBlockInliner.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BetterPhpDocParser/Printer/DocBlockInliner.php b/src/BetterPhpDocParser/Printer/DocBlockInliner.php index bc5e82ecc18..8d19822d0ab 100644 --- a/src/BetterPhpDocParser/Printer/DocBlockInliner.php +++ b/src/BetterPhpDocParser/Printer/DocBlockInliner.php @@ -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 {