Register the processor. | Class Instance | Registry | Name | Priority | | -------------------------------------------------------------- | -------------------------------------
(self, md)
| 496 | super().__init__(**kwargs) |
| 497 | |
| 498 | def extendMarkdown(self, md): |
| 499 | """ Register the processor. |
| 500 | |
| 501 | | Class Instance | Registry | Name | Priority | |
| 502 | | -------------------------------------------------------------- | ---------------------------------------------------------------- | ------ | :------: | |
| 503 | | [`TocTreeprocessor`][markdown.extensions.toc.TocTreeprocessor] | [`treeprocessors`][markdown.treeprocessors.build_treeprocessors] | `toc` | `5` | |
| 504 | |
| 505 | """ |
| 506 | # flake8: noqa: E501 478-480 |
| 507 | md.registerExtension(self) |
| 508 | self.md = md |
| 509 | self.reset() |
| 510 | tocext = self.TreeProcessorClass(md, self.getConfigs()) |
| 511 | md.treeprocessors.register(tocext, 'toc', 5) |
| 512 | |
| 513 | def reset(self) -> None: |
| 514 | self.md.toc = '' |
no test coverage detected