Skip to content

Commit

Permalink
Fix FormatVersion not being parsed correctly if report uses CRLF
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Apr 18, 2024
1 parent 4f72b2f commit 2307417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Parser/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function buildTree(string $reportData) : TimingsReport{
$groupTotals = [];

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

Expand Down

0 comments on commit 2307417

Please sign in to comment.