X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/a04865183fefdd58b0de1cea7c69a9b04a408e53..b82af79bb9da4c033e3891bba40e913e19393be3:/pokedex/db/markdown.py diff --git a/pokedex/db/markdown.py b/pokedex/db/markdown.py index 257c8de..c82ce68 100644 --- a/pokedex/db/markdown.py +++ b/pokedex/db/markdown.py @@ -31,11 +31,17 @@ class MarkdownString(object): def __unicode__(self): return self.source_text + def __str__(self): + return unicode(self.source_text).encode() + + def __html__(self): + return self.as_html + @property def as_html(self): """Returns the string as HTML4.""" - if self._as_html: + if self._as_html is not None: return self._as_html md = markdown.Markdown(