def format(self, formatter, link_resolver, output):
if not self.title and self.name:<EOL><INDENT>title = os.path.splitext(self.name)[<NUM_LIT:0>]<EOL>self.title = os.path.basename(title).replace('<STR_LIT:->', '<STR_LIT:U+0020>')<EOL><DEDENT>self.formatted_contents = u'<STR_LIT>'<EOL>self.build_path = os.path.join(formatter.get_output_folder(self),<EOL>self.link.ref)<EOL>if self.ast:<EOL><INDENT>out, diags = cmark.ast_to_html(self.ast, link_resolver)<EOL>for diag in diags:<EOL><INDENT>warn(<EOL>diag.code,<EOL>message=diag.message,<EOL>filename=self.source_file or self.name)<EOL><DEDENT>self.formatted_contents += out<EOL><DEDENT>if not self.formatted_contents:<EOL><INDENT>self.__format_page_comment(formatter, link_resolver)<EOL><DEDENT>self.output_attrs = defaultdict(lambda: defaultdict(dict))<EOL>formatter.prepare_page_attributes(self)<EOL>self.__format_symbols(formatter, link_resolver)<EOL>self.detailed_description =formatter.format_page(self)[<NUM_LIT:0>]<EOL>if output:<EOL><INDENT>formatter.cache_page(self)<EOL><DEDENT>
Banana banana