X-Git-Url: http://git.scottworley.com/paperdoorknob/blobdiff_plain/f1dec72014657ab33bffa8f68064d85cc862ea65..30b145cc4660ae5d86bd0de88e373d3107ba54d5:/texify.py?ds=inline diff --git a/texify.py b/texify.py index 83a8c67..65b4230 100644 --- a/texify.py +++ b/texify.py @@ -49,6 +49,9 @@ class DirectTexifier(Texifier): def texify(self, html: Tag) -> bytes: if html.name == 'em': return b'\\emph{' + self._texify_children(html).strip() + b'}\n' + if html.name == 'a' and 'href' in html.attrs: + return b'\\href{' + html.attrs['href'].encode( + 'UTF-8') + b'}{' + self._texify_children(html).strip() + b'}\n' return self._texify_children(html)