def write_out_sitemap(self, opath):
if opath not in self.written_out_sitemaps:<EOL><INDENT>Extension.formatted_sitemap = self.formatter.format_navigation(<EOL>self.app.project)<EOL>if Extension.formatted_sitemap:<EOL><INDENT>escaped_sitemap = Extension.formatted_sitemap.replace(<EOL>'<STR_LIT:\\>', '<STR_LIT>').replace('<STR_LIT:">', '<STR_LIT>').replace('<STR_LIT:\n>', '<STR_LIT>')<EOL>js_wrapper = '<STR_LIT>' % escaped_sitemap<EOL>with open(opath, '<STR_LIT:w>') as _:<EOL><INDENT>_.write(js_wrapper)<EOL><DEDENT><DEDENT><DEDENT>self.written_out_sitemaps.add(opath)<EOL>
Banana banana