

def run(self, parent, blocks):
    block = blocks.pop(0)
    if block.strip():
        if self.parser.state.isstate('list'):
            sibling = self.lastChild(parent)
            if (sibling is not None):
                if sibling.tail:
                    sibling.tail = ('%s\n%s' % (sibling.tail, block))
                else:
                    sibling.tail = ('\n%s' % block)
            elif parent.text:
                parent.text = ('%s\n%s' % (parent.text, block))
            else:
                parent.text = block.lstrip()
        else:
            p = util.etree.SubElement(parent, 'p')
            p.text = block.lstrip()

dataset/ETHPy150Open darcyliu/storyboard/markdown/blockprocessors.py ParagraphProcessor.run/original