'Returns the string as HTML.
Pass a custom `extension` to use your own extension object to generate
links.
The default is the session\'s markdown_extension. Usually that\'s a
`PokedexLinkExtension` described below, which is also the recommended
superclass.'

def as_html(self, extension=None):

    if (extension is None):
        extension = self.session.markdown_extension
    md = markdown.Markdown(extensions=['extra', extension], safe_mode='escape', output_format='xhtml1')
    return md.convert(self.source_text)
