X-Git-Url: http://git.scottworley.com/paperdoorknob/blobdiff_plain/f1dec72014657ab33bffa8f68064d85cc862ea65..d6e27f4bb8ab56ca2545a72ab3433a12b1eb4a7f:/texify.py 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)