MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / HtmlBlockPreprocessor

Class HtmlBlockPreprocessor

markdown/extensions/md_in_html.py:310–318  ·  view source on GitHub ↗

Remove html blocks from the text and store them for later retrieval.

Source from the content-addressed store, hash-verified

308
309
310class HtmlBlockPreprocessor(Preprocessor):
311 """Remove html blocks from the text and store them for later retrieval."""
312
313 def run(self, lines: list[str]) -> list[str]:
314 source = '\n'.join(lines)
315 parser = HTMLExtractorExtra(self.md)
316 parser.feed(source)
317 parser.close()
318 return ''.join(parser.cleandoc).split('\n')
319
320
321class MarkdownInHtmlProcessor(BlockProcessor):

Callers 1

extendMarkdownMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected