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