Exemplo n.º 1
0
    def convert(self, text):
        mtext = Markdown.convert(self, text)
        text = self.postpostprocess(mtext)

        # This is a total gross hack: reproduce the UnicodeWithAttrs wrapping
        # that markdown2.py is doing.
        rv = UnicodeWithAttrs(text)
        if hasattr(mtext, "_toc"):
            rv._toc = mtext._toc
        if hasattr(mtext, "metadata"):
            rv.metadata = mtext.metadata
        return rv
Exemplo n.º 2
0
    def convert(self, text):
        mtext = Markdown.convert(self, text)
        text = self.postpostprocess(mtext)

        # This is a total gross hack: reproduce the UnicodeWithAttrs wrapping
        # that markdown2.py is doing.
        rv = UnicodeWithAttrs(text)
        if hasattr(mtext, "_toc"):
            rv._toc = mtext._toc
        if hasattr(mtext, "metadata"):
            rv.metadata = mtext.metadata
        return rv
Exemplo n.º 3
0
 def __init__(self, api_sections=None, **kwargs):
     self.api_sections = api_sections
     Markdown.__init__(self, **kwargs)
Exemplo n.º 4
0
 def __init__(self, api_sections=None, **kwargs):
     self.api_sections = api_sections
     Markdown.__init__(self, **kwargs)