Skip to content

Commit

Permalink
modified hashtag to allow numbers but not as first character
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketMan committed Oct 21, 2023
1 parent d0f493a commit 7ff78a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function searchByAlbumKey($key = null) {

// hashtags
$hashtags = array_reduce(array_reverse($reviews), function($carry, $review) {
return preg_match_all('/#[\pL_]+/', $review['review'], $matches) ?
return preg_match_all('/#\pL\w*/', $review['review'], $matches) ?
array_merge($carry, $matches[0]) : $carry;
}, []);
$normalized = array_unique(array_map('strtolower', $hashtags));
Expand Down

0 comments on commit 7ff78a2

Please sign in to comment.