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 deb8f2a38b
commit 398df867de
1 changed files with 1 additions and 1 deletions

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.");
$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('/(?:^|\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;
}