~lioploum/offpunk

1cd331170c74f7ceba9a5320d09029b6927073ae — Bert Livens 10 months ago eea9140
Added support for <dd> and <dt> tags to ansicat to render websites like https://fsl.software/ better.

Signed-off-by: Bert Livens <bert@bertlivens.be>
2 files changed, 3 insertions(+), 2 deletions(-)

M CHANGELOG
M ansicat.py
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)