示例#1
0
    def render(self, nodes, document):

        new_document = document.copy()

        new_document.children = nodes

        writer = TextWriter(TextBuilder(self.app))
        output = writer.write(new_document, FakeDestination())

        return output.strip()
示例#2
0
 def __init__(self, app):
     TextBuilder.__init__(self, app)
     self.out_suffix = '.md'
示例#3
0
 def finish(self):
     self.copy_image_files()
     return TextBuilder.finish(self)
示例#4
0
 def write_doc(self, docname, doctree):
     self.imgpath = relative_uri(self.get_target_uri(docname), '_images')
     self.post_process_images(doctree)
     self.current_docname = docname
     return TextBuilder.write_doc(self, docname, doctree)
示例#5
0
 def finish(self):
     self.copy_image_files()
     return TextBuilder.finish(self)
示例#6
0
 def write_doc(self, docname, doctree):
     self.imgpath = relative_uri(self.get_target_uri(docname), '_images')
     self.post_process_images(doctree)
     self.current_docname = docname
     return TextBuilder.write_doc(self, docname, doctree)