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

Function build_treeprocessors

markdown/treeprocessors.py:39–45  ·  view source on GitHub ↗

Build the default `treeprocessors` for Markdown.

(md: Markdown, **kwargs: Any)

Source from the content-addressed store, hash-verified

37
38
39def build_treeprocessors(md: Markdown, **kwargs: Any) -> util.Registry[Treeprocessor]:
40 """ Build the default `treeprocessors` for Markdown. """
41 treeprocessors = util.Registry()
42 treeprocessors.register(InlineProcessor(md), 'inline', 20)
43 treeprocessors.register(PrettifyTreeprocessor(md), 'prettify', 10)
44 treeprocessors.register(UnescapeTreeprocessor(md), 'unescape', 0)
45 return treeprocessors
46
47
48def isString(s: object) -> bool:

Callers 1

build_parserMethod · 0.85

Calls 4

registerMethod · 0.95
InlineProcessorClass · 0.70

Tested by

no test coverage detected