Skip to content

Commit 2307417

Browse files
committedApr 18, 2024··
Fix FormatVersion not being parsed correctly if report uses CRLF
1 parent 4f72b2f commit 2307417

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/Parser/Parser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static function buildTree(string $reportData) : TimingsReport{
4545
$groupTotals = [];
4646

4747
$formatVersion = self::VERSION_INITIAL;
48-
if(preg_match('/^# FormatVersion (\d+)$/mi', $reportData, $matches)){
48+
if(preg_match('/(*ANYCRLF)^# FormatVersion (\d+)$/mi', $reportData, $matches)){
4949
$formatVersion = (int) $matches[1];
5050
}
5151

0 commit comments

Comments
 (0)
Please sign in to comment.