(self, md, md_globals)
Add FencedBlockPreprocessor to the Markdown instance.
Add FencedBlockPreprocessor to the Markdown instance.
Add FencedBlockPreprocessor to the Markdown instance .
def extendMarkdown(self, md, md_globals):
        """Add FencedBlockPreprocessor to the Markdown instance."""

        # Not super yet, so let's make it super
        md.registerExtension(self)
        config = self.getConfigs()
        sf_entry = {
            "name": "superfences",
            "test": lambda language: True,
            "formatter": None
        }
        if not hasattr(md, "superfences"):
            md.superfences = []
        md.superfences.insert(0, sf_entry)
        if config.get("uml_flow", True):
            extend_super_fences(
                md, "flow", "flow",
                lambda s, l, c="uml-flowchart": uml_format(s, l, c)
            )
        if config.get("uml_sequence", True):
            extend_super_fences(
                md, "sequence", "sequence",
                lambda s, l, c="uml-sequence-diagram": uml_format(s, l, c)
            )
        self.markdown = md
        self.patch_fenced_rule()
        for entry in self.markdown.superfences:
            entry["stash"] = CodeStash()
def extendMarkdown ( self , md , md_globals ) : # Not super yet, so let's make it super md . registerExtension ( self ) config = self . getConfigs ( ) sf_entry = { "name" : "superfences" , "test" : lambda language : True , "formatter" : None } if not hasattr ( md , "superfences" ) : md . superfences = [ ] md . superfences . insert ( 0 , sf_entry ) if config . get ( "uml_flow" , True ) : extend_super_fences ( md , "flow" , "flow" , lambda s , l , c = "uml-flowchart" : uml_format ( s , l , c ) ) if config . get ( "uml_sequence" , True ) : extend_super_fences ( md , "sequence" , "sequence" , lambda s , l , c = "uml-sequence-diagram" : uml_format ( s , l , c ) ) self . markdown = md self . patch_fenced_rule ( ) for entry in self . markdown . superfences : entry [ "stash" ] = CodeStash ( )