MCPcopy
hub / github.com/Python-Markdown/markdown / test

Method test

markdown/blockprocessors.py:174–179  ·  view source on GitHub ↗
(self, parent: etree.Element, block: str)

Source from the content-addressed store, hash-verified

172 self.INDENT_RE = re.compile(r'^(([ ]{%s})+)' % self.tab_length)
173
174 def test(self, parent: etree.Element, block: str) -> bool:
175 return block.startswith(' '*self.tab_length) and \
176 not self.parser.state.isstate('detabbed') and \
177 (parent.tag in self.ITEM_TYPES or
178 (len(parent) and parent[-1] is not None and
179 (parent[-1].tag in self.LIST_TYPES)))
180
181 def run(self, parent: etree.Element, blocks: list[str]) -> None:
182 block = blocks.pop(0)

Callers

nothing calls this directly

Calls 1

isstateMethod · 0.80

Tested by

no test coverage detected