From ead95f2ec5df3a8e1dbdc087b58e676cd7466fc7 Mon Sep 17 00:00:00 2001 From: Konstantin Likhachev Date: Sat, 18 May 2024 21:38:02 +0300 Subject: [PATCH] fix: Wrong commits with non-latin description grouping --- composer.json | 5 +++-- src/Changelog.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 70bc044..17bcab6 100644 --- a/composer.json +++ b/composer.json @@ -65,7 +65,8 @@ "require": { "php": ">=7.1.3", "ext-json": "*", - "symfony/console": "^4 || ^5 || ^6 || ^7" + "symfony/console": "^4 || ^5 || ^6 || ^7", + "ext-mbstring": "*" }, "extra": { "hooks": { @@ -74,4 +75,4 @@ "post-merge": "composer install" } } -} \ No newline at end of file +} diff --git a/src/Changelog.php b/src/Changelog.php index 2bcd4ba..027b481 100644 --- a/src/Changelog.php +++ b/src/Changelog.php @@ -492,7 +492,7 @@ protected function getVersionCode(string $tag, string $prefix, string $suffix): */ protected function getItemKey(string $string): string { - return strtolower(preg_replace('/[^a-zA-Z0-9_-]+/', '', $string)); + return mb_strtolower(preg_replace('/\s+/', '', $string)); } /**