use capturing parens for matching at-mentions in twitterstatusfetcher

This commit is contained in:
Evan Prodromou 2010-09-10 09:21:01 -04:00
parent 262eb7120f
commit cfcb860317

View File

@ -716,7 +716,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon
common_log(LOG_WARNING, "No entities data for {$status->id}; trying to fake up links ourselves."); common_log(LOG_WARNING, "No entities data for {$status->id}; trying to fake up links ourselves.");
$text = common_replace_urls_callback($text, 'common_linkify'); $text = common_replace_urls_callback($text, 'common_linkify');
$text = preg_replace('/(^|\&quot\;|\'|\(|\[|\{|\s+)#([\pL\pN_\-\.]{1,64})/e', "'\\1#'.TwitterStatusFetcher::tagLink('\\2')", $text); $text = preg_replace('/(^|\&quot\;|\'|\(|\[|\{|\s+)#([\pL\pN_\-\.]{1,64})/e', "'\\1#'.TwitterStatusFetcher::tagLink('\\2')", $text);
$text = preg_replace('/(?:^|\s+)@([a-z0-9A-Z_]{1,64})/e', "'\\1@'.TwitterStatusFetcher::atLink('\\2')", $text); $text = preg_replace('/(^|\s+)@([a-z0-9A-Z_]{1,64})/e', "'\\1@'.TwitterStatusFetcher::atLink('\\2')", $text);
return $text; return $text;
} }