From 579b86ec2739df75cc1556940b426b51059e392b Mon Sep 17 00:00:00 2001 From: Peter O'Callaghan Date: Sun, 8 Apr 2012 20:16:50 +0200 Subject: [PATCH] Allows apostrophe (and single quote, since this is often used in lieu) in author name. --- src/Composer/Command/InitCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index 290898c7e..cab7d5749 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -33,7 +33,7 @@ class InitCommand extends Command public function parseAuthorString($author) { - if (preg_match('/^(?P[- \.,\w]+) <(?P.+?)>$/u', $author, $match)) { + if (preg_match('/^(?P[- \.,\w\'’]+) <(?P.+?)>$/u', $author, $match)) { if (!function_exists('filter_var') || $match['email'] === filter_var($match['email'], FILTER_VALIDATE_EMAIL)) { return array( 'name' => trim($match['name']),