forked from mirror/pixelfed
Merge pull request #137 from Skehmatics/fix/apostrophe-bug
(Lazily) fix #131 by ignoring hashtags that begin with a ampersand in lexer
This commit is contained in:
commit
16f4d52476
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ class Hashtag {
|
||||||
public static function getHashtags($status)
|
public static function getHashtags($status)
|
||||||
{
|
{
|
||||||
$hashtags = false;
|
$hashtags = false;
|
||||||
preg_match_all("/(#\w+)/u", $status, $matches);
|
preg_match_all("/(?<!&)(#\w+)/u", $status, $matches);
|
||||||
if ($matches) {
|
if ($matches) {
|
||||||
$res = array_count_values($matches[0]);
|
$res = array_count_values($matches[0]);
|
||||||
$hashtags = array_keys($res);
|
$hashtags = array_keys($res);
|
||||||
|
|
Loading…
Reference in a new issue