Render markdown string into html. It does all magic for you :). :param src: source string :param env: environment sandbox :returns: The output of the loaded renderer `env` can be used to inject additional metadata (`{}` by default). But you will not need it
(self, src: str, env: EnvType | None = None)
| 273 | return state.tokens |
| 274 | |
| 275 | def render(self, src: str, env: EnvType | None = None) -> Any: |
| 276 | """Render markdown string into html. It does all magic for you :). |
| 277 | |
| 278 | :param src: source string |
| 279 | :param env: environment sandbox |
| 280 | :returns: The output of the loaded renderer |
| 281 | |
| 282 | `env` can be used to inject additional metadata (`{}` by default). |
| 283 | But you will not need it with high probability. See also comment |
| 284 | in [[MarkdownIt.parse]]. |
| 285 | """ |
| 286 | env = {} if env is None else env |
| 287 | return self.renderer.render(self.parse(src, env), self.options, env) |
| 288 | |
| 289 | def parseInline(self, src: str, env: EnvType | None = None) -> list[Token]: |
| 290 | """The same as [[MarkdownIt.parse]] but skip all block rules. |