Skip to content

Commit 26c0a98

Browse files
committed
Optimize REGEX_THEMATIC_BREAK by consolidating anchors
1 parent 727f5fa commit 26c0a98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Util/RegexHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ final class RegexHelper
7272

7373
public const REGEX_WHITESPACE_CHAR = '/^[ \t\n\x0b\x0c\x0d]/';
7474
public const REGEX_UNICODE_WHITESPACE_CHAR = '/^\pZ|\s/u';
75-
public const REGEX_THEMATIC_BREAK = '/^(?:\*[ \t]*){3,}$|^(?:_[ \t]*){3,}$|^(?:-[ \t]*){3,}$/';
75+
public const REGEX_THEMATIC_BREAK = '/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})$/';
7676
public const REGEX_LINK_DESTINATION_BRACES = '/^(?:<(?:[^<>\\n\\\\\\x00]|\\\\.)*>)/';
7777

7878
/**

0 commit comments

Comments
 (0)