Ejemplo 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
Ejemplo 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
Ejemplo n.º 3
0
 def __init__(self, api_sections=None, **kwargs):
     self.api_sections = api_sections
     Markdown.__init__(self, **kwargs)
Ejemplo n.º 4
0
 def __init__(self, api_sections=None, **kwargs):
     self.api_sections = api_sections
     Markdown.__init__(self, **kwargs)