kopia lustrzana https://github.com/pixelfed/pixelfed
Merge pull request #137 from Skehmatics/fix/apostrophe-bug
(Lazily) fix #131 by ignoring hashtags that begin with a ampersand in lexerpull/199/head
commit
16f4d52476
|
@ -7,7 +7,7 @@ class Hashtag {
|
|||
public static function getHashtags($status)
|
||||
{
|
||||
$hashtags = false;
|
||||
preg_match_all("/(#\w+)/u", $status, $matches);
|
||||
preg_match_all("/(?<!&)(#\w+)/u", $status, $matches);
|
||||
if ($matches) {
|
||||
$res = array_count_values($matches[0]);
|
||||
$hashtags = array_keys($res);
|
||||
|
|
Ładowanie…
Reference in New Issue