-
-
Couldn't load subscription status.
- Fork 308
Description
Mastodon for Android requires the hashtag class on anchor elements to treat them as hashtag links:
mastodon-android/mastodon/src/main/java/org/joinmastodon/android/ui/text/HtmlParser.java
Lines 148 to 153 in 9361c6d
| if(el.hasClass("hashtag")){ | |
| String text=el.text(); | |
| if(text.startsWith("#")){ | |
| linkType=LinkSpan.Type.HASHTAG; | |
| href=text.substring(1); | |
| linkObject=tagsByTag.get(text.substring(1).toLowerCase()); |
The web interface does not (and also covers hashtag links with outer "#"): https://github.com/mastodon/mastodon/blob/67a8d4638c6e6a3ef178258504a6535746608c42/app/javascript/hooks/useLinks.ts#L13-L15
This occasionally causes trouble: snarfed/bridgy-fed#1634 (comment)
It would be good to have parity here. Personally I'd prefer the behaviour of the web version, as I think I saw a post where the link didn't cover the "#".