MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / run

Method run

markdown/blockprocessors.py:450–463  ·  view source on GitHub ↗
(self, parent, blocks)

Source from the content-addressed store, hash-verified

448 return True
449
450 def run(self, parent, blocks):
451 block = blocks.pop(0)
452 if block.strip():
453 # Not a blank block. Add to parent, otherwise throw it away.
454 if self.parser.state.isstate('list'):
455 # The parent is a tight-list. Append to parent.text
456 if parent.text:
457 parent.text = '%s\n%s' % (parent.text, block)
458 else:
459 parent.text = block.lstrip()
460 else:
461 # Create a regular paragraph
462 p = markdown.etree.SubElement(parent, 'p')
463 p.text = block.lstrip()

Callers

nothing calls this directly

Calls 2

isstateMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected