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

Method test

markdown/extensions/admonition.py:131–139  ·  view source on GitHub ↗
(self, parent: etree.Element, block: str)

Source from the content-addressed store, hash-verified

129 return sibling, block, the_rest
130
131 def test(self, parent: etree.Element, block: str) -> bool:
132
133 # Check for the marker before running the regex, which is slow to scan
134 # long blocks. Blocks which other processors split one line at a time
135 # get tested again and again.
136 if '!!!' in block and self.RE.search(block):
137 return True
138 else:
139 return self.parse_content(parent, block)[0] is not None
140
141 def run(self, parent: etree.Element, blocks: list[str]) -> None:
142 block = blocks.pop(0)

Callers

nothing calls this directly

Calls 2

parse_contentMethod · 0.95
searchMethod · 0.80

Tested by

no test coverage detected