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()
def __init__(self, app): TextBuilder.__init__(self, app) self.out_suffix = '.md'
def finish(self): self.copy_image_files() return TextBuilder.finish(self)
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)