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