Skip to content

Commit

Permalink
Fix version regex in formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Jun 5, 2024
1 parent 342ddb4 commit a5d4e3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Changelog/Formatter/AddTopFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ public function updateExistingLines(

public function getLastVersionRegex(): string
{
return '#.*#';
return '#(\d+\.\d+\.\d+.*)#';
}
}
2 changes: 1 addition & 1 deletion src/Changelog/Formatter/PrefixGroupFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function updateExistingLines(

public function getLastVersionRegex(): string
{
return '#.*#';
return '/\[(\d+\.\d+\.\d+.*)\]/';
}

private function getFormattedDate(): string
Expand Down

0 comments on commit a5d4e3c

Please sign in to comment.