Skip to content

Commit cc6e900

Browse files
committed
Optimize PARTIAL_HTMLCOMMENT with better grouping
1 parent 142edc4 commit cc6e900

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
@@ -53,7 +53,7 @@ final class RegexHelper
5353
public const PARTIAL_CLOSETAG = '<\/' . self::PARTIAL_TAGNAME . '\s*[>]';
5454
public const PARTIAL_OPENBLOCKTAG = '<' . self::PARTIAL_BLOCKTAGNAME . self::PARTIAL_ATTRIBUTE . '*' . '\s*\/?>';
5555
public const PARTIAL_CLOSEBLOCKTAG = '<\/' . self::PARTIAL_BLOCKTAGNAME . '\s*[>]';
56-
public const PARTIAL_HTMLCOMMENT = '<!-->|<!--->|<!--[\s\S]*?-->';
56+
public const PARTIAL_HTMLCOMMENT = '(?:<!-->|<!--->|<!--[\s\S]*?-->)';
5757
public const PARTIAL_PROCESSINGINSTRUCTION = '[<][?][\s\S]*?[?][>]';
5858
public const PARTIAL_DECLARATION = '<![A-Za-z]+' . '[^>]*>';
5959
public const PARTIAL_CDATA = '<!\[CDATA\[[\s\S]*?]\]>';

0 commit comments

Comments
 (0)