From 758b064c654cd0945f2f2fde0fe65aba5d690099 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 28 Jan 2024 18:53:09 +0000 Subject: [PATCH] Updated Rector to commit c5d4a78df1fe7ad674631f7373e127ff75eae896 https://github.com/rectorphp/rector-src/commit/c5d4a78df1fe7ad674631f7373e127ff75eae896 [Windows] Support replace \r\n on DocBlockInliner (#5513) --- src/Application/VersionResolver.php | 4 ++-- src/BetterPhpDocParser/Printer/DocBlockInliner.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 3228f7bb693a..4a72acbbee6a 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '1b4395caa0579c559e484b75b7fd9baadc307c0c'; + public const PACKAGE_VERSION = 'c5d4a78df1fe7ad674631f7373e127ff75eae896'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-01-28 10:58:04'; + public const RELEASE_DATE = '2024-01-29 01:50:53'; /** * @var int */ diff --git a/src/BetterPhpDocParser/Printer/DocBlockInliner.php b/src/BetterPhpDocParser/Printer/DocBlockInliner.php index 46910ab60a86..be0f20644449 100644 --- a/src/BetterPhpDocParser/Printer/DocBlockInliner.php +++ b/src/BetterPhpDocParser/Printer/DocBlockInliner.php @@ -8,14 +8,14 @@ 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 { $docContent = Strings::replace($docContent, self::NEWLINE_MIDDLE_DOC_REGEX, ' ');