sync regex fix

Signed-off-by: Andy Miller <rhuk@mac.com>
This commit is contained in:
Andy Miller
2025-11-04 14:15:05 +00:00
parent 44bdd1283d
commit 7b1bcf7789

View File

@@ -246,7 +246,9 @@ class SelfupgradeCommand extends GpmCommand
$io->newLine();
foreach ($changelog as $version => $log) {
$title = $version . ' [' . $log['date'] . ']';
$content = preg_replace_callback('/\d\.\s\[\]\(#(.*)\)/', static fn($match) => "\n" . ucfirst((string) $match[1]) . ':', (string) $log['content']);
$content = preg_replace_callback('/\d\.\s\[\]\(#(.*)\)/', static function ($match) {
return "\n" . ucfirst((string) $match[1]) . ':';
}, (string) $log['content']);
$io->writeln($title);
$io->writeln(str_repeat('-', strlen($title)));