def METHOD_NAME(self, md):
    # replace HashHeader/SetextHeader processors with our custom variants
    md.parser.blockprocessors.register(
        CustomHashHeaderProcessor(md.parser), "hashheader", 70
    )
    md.parser.blockprocessors.register(
        CustomSetextHeaderProcessor(md.parser), "setextheader", 60
    )
    # the tree processor adds the actual edit links
    add_to_registry(
        md.treeprocessors,
        "editsection",
        EditSectionProcessor(self.config, md),
        "_end",
    )