(self)
Get the content of info.md
Get the content of info.md
Get the content of info . md
async def get_info_md_content(self):
        """Get the content of info.md"""
        from ..handler.template import render_template

        info = None
        info_files = ["info", "info.md"]
        try:
            root = await self.repository_object.get_contents("", self.ref)
            for file in root:
                if file.name.lower() in info_files:
                    info = await self.repository_object.get_contents(
                        file.name, self.ref
                    )
                    break
            if info is None:
                self.information.additional_info = ""
            else:
                info = await self.github.render_markdown(info.content)
                info = info.replace("&lt;", "<")
                info = info.replace("<h3>", "<h6>").replace("</h3>", "</h6>")
                info = info.replace("<h2>", "<h5>").replace("</h2>", "</h5>")
                info = info.replace("<h1>", "<h4>").replace("</h1>", "</h4>")
                info = info.replace("<code>", "<code class='codeinfo'>")
                info = info.replace(
                    '<a href="http', '<a rel="noreferrer" target="_blank" href="http'
                )
                info = info.replace("<ul>", "")
                info = info.replace("</ul>", "")
                info += "</br>"
                self.information.additional_info = render_template(info, self)

        except Exception:  # Gotta Catch 'Em All
            self.information.additional_info = ""
async def get_info_md_content ( self ) : from . . handler . template import render_template info = None info_files = [ "info" , "info.md" ] try : root = await self . repository_object . get_contents ( "" , self . ref ) for file in root : if file . name . lower ( ) in info_files : info = await self . repository_object . get_contents ( file . name , self . ref ) break if info is None : self . information . additional_info = "" else : info = await self . github . render_markdown ( info . content ) info = info . replace ( "&lt;" , "<" ) info = info . replace ( "<h3>" , "<h6>" ) . replace ( "</h3>" , "</h6>" ) info = info . replace ( "<h2>" , "<h5>" ) . replace ( "</h2>" , "</h5>" ) info = info . replace ( "<h1>" , "<h4>" ) . replace ( "</h1>" , "</h4>" ) info = info . replace ( "<code>" , "<code class='codeinfo'>" ) info = info . replace ( '<a href="http' , '<a rel="noreferrer" target="_blank" href="http' ) info = info . replace ( "<ul>" , "" ) info = info . replace ( "</ul>" , "" ) info += "</br>" self . information . additional_info = render_template ( info , self ) except Exception : # Gotta Catch 'Em All self . information . additional_info = ""