M CHANGELOG => CHANGELOG +1 -0
@@ 11,6 11,7 @@
- offpunk: removed "blackbox", which has not been used nor maintained
- offpunk: "gus" was broken, it is functionnal again
- opnk/offpunk: more informative prompt in less
+- ansicat: added support for HTML description elements <dt> and <dd> (by Bert Livens)
## 2.1 - December 15th 2023
- freshly updated gemtext/rss links are highlighted ("new_link" theme option)
M ansicat.py => ansicat.py +2 -2
@@ 1085,7 1085,7 @@ class HtmlRenderer(AbstractRenderer):
toreturn = " " + toreturn
return toreturn
def recursive_render(element,indent="",preformatted=False):
- if element.name == "blockquote":
+ if element.name in ["blockquote", "dd"]:
r.newparagraph()
r.startindent(" ",reverse=" ")
for child in element.children:
@@ 1093,7 1093,7 @@ class HtmlRenderer(AbstractRenderer):
recursive_render(child,indent="\t")
r.close_theme("blockquote")
r.endindent()
- elif element.name in ["div","p"]:
+ elif element.name in ["div","p","dt"]:
r.newparagraph()
for child in element.children:
recursive_render(child,indent=indent)