Merge pull request #137 from Skehmatics/fix/apostrophe-bug

(Lazily) fix #131 by ignoring hashtags that begin with a ampersand in lexer
pull/199/head
daniel 7 years ago committed by GitHub
commit 16f4d52476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save