fix(akkoma-hashtags): an issue where akkoma for some reason needs this for hashtags to open properly
This commit is contained in:
@@ -137,14 +137,12 @@ public class HtmlParser{
|
|||||||
String href=el.attr("href");
|
String href=el.attr("href");
|
||||||
LinkSpan.Type linkType;
|
LinkSpan.Type linkType;
|
||||||
String text=el.text();
|
String text=el.text();
|
||||||
if(el.hasClass("hashtag")){
|
if(el.hasClass("hashtag") || text.startsWith("#")){
|
||||||
if(text.startsWith("#")){
|
// MOSHIDON: we have slightly refactored this so that the hashtags properly work in akkoma
|
||||||
|
// TODO: upstream this
|
||||||
linkType=LinkSpan.Type.HASHTAG;
|
linkType=LinkSpan.Type.HASHTAG;
|
||||||
href=text.substring(1);
|
href=text.substring(1);
|
||||||
linkObject=tagsByTag.get(text.substring(1).toLowerCase());
|
linkObject=tagsByTag.get(text.substring(1).toLowerCase());
|
||||||
}else{
|
|
||||||
linkType=LinkSpan.Type.URL;
|
|
||||||
}
|
|
||||||
}else if(el.hasClass("mention")){
|
}else if(el.hasClass("mention")){
|
||||||
String id=idsByUrl.get(href);
|
String id=idsByUrl.get(href);
|
||||||
if(id!=null){
|
if(id!=null){
|
||||||
|
|||||||
Reference in New Issue
Block a user