X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;ds=inline;f=phd.py;h=19394839d9ebef92aca3173f3cdc708c34875f71;hb=e60e759a14bd4e0dcc4b1db69ce715058cde0b01;hp=e12fb902cb88599af9dfc49a13a361df6c4d9f0d;hpb=42465be8abac2fdb32c939bc7e5ad0fbca5df2f8;p=phdru.name%2Fphdru.name.git diff --git a/phd.py b/phd.py index e12fb90..1939483 100644 --- a/phd.py +++ b/phd.py @@ -44,6 +44,8 @@ class phd(Template): return self.text2html() if hasattr(self, "body_rst"): return self.rst2html() + if hasattr(self, "body_mkd"): + return self.mkd2html() def text2html(self): body = re.sub(url_re, _url2href, self.body_text()) @@ -66,22 +68,24 @@ class phd(Template): def rst2html(self): from docutils.core import publish_parts - from m_lib.defenc import default_encoding as encoding parts = publish_parts(self.body_rst(), writer_name="html") - title = parts["title"].encode(encoding) or self.Title + title = parts["title"] or self.Title if title: title = "