mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 08:48:53 +00:00
[Glitch] Fix hashtags not being picked up when full-width hash sign is used
Port 779a1f8448 to glitch-soc
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export function recoverHashtags (recognizedTags, text) {
|
||||
return recognizedTags.map(tag => {
|
||||
const re = new RegExp(`(?:^|[^/)\\w])#(${tag.name})`, 'i');
|
||||
const re = new RegExp(`(?:^|[^/)\\w])[##](${tag.name})`, 'i');
|
||||
const matched_hashtag = text.match(re);
|
||||
return matched_hashtag ? matched_hashtag[1] : null;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user