(self, parent, blocks)
| 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() |