Register the processor. | Class Instance | Registry | Name | Priority | | -------------------------------------------------------------- | -------------------------------------
(self, md)
| 473 | super().__init__(**kwargs) |
| 474 | |
| 475 | def extendMarkdown(self, md): |
| 476 | """ Register the processor. |
| 477 | |
| 478 | | Class Instance | Registry | Name | Priority | |
| 479 | | -------------------------------------------------------------- | ---------------------------------------------------------------- | ------ | :------: | |
| 480 | | [`TocTreeprocessor`][markdown.extensions.toc.TocTreeprocessor] | [`treeprocessors`][markdown.treeprocessors.build_treeprocessors] | `toc` | `5` | |
| 481 | |
| 482 | """ |
| 483 | # flake8: noqa: E501 478-480 |
| 484 | md.registerExtension(self) |
| 485 | self.md = md |
| 486 | self.reset() |
| 487 | tocext = self.TreeProcessorClass(md, self.getConfigs()) |
| 488 | md.treeprocessors.register(tocext, 'toc', 5) |
| 489 | |
| 490 | def reset(self) -> None: |
| 491 | self.md.toc = '' |
no test coverage detected