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

Class HtmlBlockPreprocessor

markdown/extensions/md_in_html.py:300–308  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

298
299
300class HtmlBlockPreprocessor(Preprocessor):
301 """Remove html blocks from the text and store them for later retrieval."""
302
303 def run(self, lines: list[str]) -> list[str]:
304 source = '\n'.join(lines)
305 parser = HTMLExtractorExtra(self.md)
306 parser.feed(source)
307 parser.close()
308 return ''.join(parser.cleandoc).split('\n')
309
310
311class MarkdownInHtmlProcessor(BlockProcessor):

Callers 1

extendMarkdownMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected