docs for each at http://daringfireball.net/projects/markdown/ and
http://michelf.com/projects/php-markdown/extra/ respectively.
-Pokédex links are represented with the extended syntax `[name]{type}`, e.g.,
-`[Eevee]{pokemon}`. The actual code that parses these is in spline-pokedex.
+Pokédex links are represented with the syntax `[text]{type:identifier}`, e.g.,
+`[Eevee]{pokemon:eevee}`. The actual code that parses these is in
+spline-pokedex.
"""
from __future__ import absolute_import
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(