From 7a61acb1f652830486960c0844ca27f84d7f3f43 Mon Sep 17 00:00:00 2001 From: Matthieu Werner Date: Wed, 27 Dec 2023 18:31:36 +0100 Subject: [PATCH 1/2] Fix line break issue --- src/JoliTypo/Fixer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JoliTypo/Fixer.php b/src/JoliTypo/Fixer.php index 7dd34ac..0955090 100644 --- a/src/JoliTypo/Fixer.php +++ b/src/JoliTypo/Fixer.php @@ -34,7 +34,7 @@ class Fixer public const TRADE = '™'; // ™ public const REG = '®'; // ® public const COPY = '©'; // © - public const ALL_SPACES = "\xE2\x80\xAF|\xC2\xAD|\xC2\xA0|\\s"; // All supported spaces, used in regexps. Better than \s + public const ALL_SPACES = "\xE2\x80\xAF|\xC2\xAD|\xC2\xA0|\\t\\r\\f\\v"; // All supported spaces, used in regexps. Better than \s public const RECOMMENDED_RULES_BY_LOCALE = [ 'en_GB' => ['Ellipsis', 'Dimension', 'Unit', 'Dash', 'SmartQuotes', 'NoSpaceBeforeComma', 'CurlyQuote', 'Hyphen', 'Trademark'], From b5cfdfa40e0edfc77aa264a04dc7a34bf7f23911 Mon Sep 17 00:00:00 2001 From: Matthieu Werner Date: Thu, 28 Dec 2023 11:28:56 +0100 Subject: [PATCH 2/2] Fix issue with wrong group --- src/JoliTypo/Fixer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JoliTypo/Fixer.php b/src/JoliTypo/Fixer.php index 0955090..8ad588f 100644 --- a/src/JoliTypo/Fixer.php +++ b/src/JoliTypo/Fixer.php @@ -34,7 +34,7 @@ class Fixer public const TRADE = '™'; // ™ public const REG = '®'; // ® public const COPY = '©'; // © - public const ALL_SPACES = "\xE2\x80\xAF|\xC2\xAD|\xC2\xA0|\\t\\r\\f\\v"; // All supported spaces, used in regexps. Better than \s + public const ALL_SPACES = "\xE2\x80\xAF|\xC2\xAD|\xC2\xA0| "; // All supported spaces, used in regexps. Better than \s public const RECOMMENDED_RULES_BY_LOCALE = [ 'en_GB' => ['Ellipsis', 'Dimension', 'Unit', 'Dash', 'SmartQuotes', 'NoSpaceBeforeComma', 'CurlyQuote', 'Hyphen', 'Trademark'],