mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Allows apostrophe (and single quote, since this is often used in lieu) in author name.
This commit is contained in:
parent
f21ce43a52
commit
579b86ec27
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,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>[- \.,\w\'’]+) <(?P<email>.+?)>$/u', $author, $match)) {
|
||||
if (!function_exists('filter_var') || $match['email'] === filter_var($match['email'], FILTER_VALIDATE_EMAIL)) {
|
||||
return array(
|
||||
'name' => trim($match['name']),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue