Anchor tags with class = hashtag or mention_hashtag are highlighted

Previously this only worked for anchor tags with nested spans.
Now it works for anchor tags with or without nested spans.
pull/359/head
Daniel Schwarz 2023-05-27 21:50:17 -04:00
rodzic 474d1f4a46
commit 439aaa604e
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -238,6 +238,13 @@ class ContentParser:
attr = self.get_best_anchor_attr(attrib_list)
if attr == "a":
# didn't find an attribute to use
# in the child markup, so let's
# try the anchor tag's own attributes
attr = self.get_urwid_attr_name(tag)
# hashtag anchors have a class of "mention hashtag"
# or "hashtag"
# we'll return style "class_mention_hashtag"