Build the parser from the various parts. Assigns a value to each of the following attributes on the class instance: * **`Markdown.preprocessors`** ([`Registry`][markdown.util.Registry]) -- A collection of [`preprocessors`][markdown.preprocessors]. * **`Ma
(self)
| 129 | self.reset() |
| 130 | |
| 131 | def build_parser(self) -> Markdown: |
| 132 | """ |
| 133 | Build the parser from the various parts. |
| 134 | |
| 135 | Assigns a value to each of the following attributes on the class instance: |
| 136 | |
| 137 | * **`Markdown.preprocessors`** ([`Registry`][markdown.util.Registry]) -- A collection of |
| 138 | [`preprocessors`][markdown.preprocessors]. |
| 139 | * **`Markdown.parser`** ([`BlockParser`][markdown.blockparser.BlockParser]) -- A collection of |
| 140 | [`blockprocessors`][markdown.blockprocessors]. |
| 141 | * **`Markdown.inlinePatterns`** ([`Registry`][markdown.util.Registry]) -- A collection of |
| 142 | [`inlinepatterns`][markdown.inlinepatterns]. |
| 143 | * **`Markdown.treeprocessors`** ([`Registry`][markdown.util.Registry]) -- A collection of |
| 144 | [`treeprocessors`][markdown.treeprocessors]. |
| 145 | * **`Markdown.postprocessors`** ([`Registry`][markdown.util.Registry]) -- A collection of |
| 146 | [`postprocessors`][markdown.postprocessors]. |
| 147 | |
| 148 | This method could be redefined in a subclass to build a custom parser which is made up of a different |
| 149 | combination of processors and patterns. |
| 150 | |
| 151 | """ |
| 152 | self.preprocessors = build_preprocessors(self) |
| 153 | self.parser = build_block_parser(self) |
| 154 | self.inlinePatterns = build_inlinepatterns(self) |
| 155 | self.treeprocessors = build_treeprocessors(self) |
| 156 | self.postprocessors = build_postprocessors(self) |
| 157 | return self |
| 158 | |
| 159 | def registerExtensions( |
| 160 | self, |
no test coverage detected