1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 09:02:59 +00:00

Init command - diacritical marks in author name

This commit is contained in:
Przemysław Piechota 2013-07-25 22:40:41 +02:00
parent 3ffad59719
commit 95cbb177dd
2 changed files with 9 additions and 1 deletions

View file

@ -35,7 +35,7 @@ class InitCommand extends Command
public function parseAuthorString($author)
{
if (preg_match('/^(?P<name>[- \.,\w\']+) <(?P<email>.+?)>$/u', $author, $match)) {
if (preg_match('/^(?P<name>[- \.,\p{L}\']+) <(?P<email>.+?)>$/u', $author, $match)) {
if ($this->isValidEmail($match['email'])) {
return array(
'name' => trim($match['name']),