mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
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)
|
||||
{
|
||||
$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);
|
||||
|
|
Loading…
Reference in a new issue