

def run(self, parent, blocks):
    block = blocks.pop(0)
    (level, sibling) = self.get_level(parent, block)
    block = self.looseDetab(block, level)
    self.parser.state.set('detabbed')
    if (parent.tag in self.ITEM_TYPES):
        if (len(parent) and (parent[(- 1)].tag in self.LIST_TYPES)):
            self.parser.parseBlocks(parent[(- 1)], [block])
        else:
            self.parser.parseBlocks(parent, [block])
    elif (sibling.tag in self.ITEM_TYPES):
        self.parser.parseBlocks(sibling, [block])
    elif (len(sibling) and (sibling[(- 1)].tag in self.ITEM_TYPES)):
        if sibling[(- 1)].text:
            p = util.etree.Element('p')
            p.text = sibling[(- 1)].text
            sibling[(- 1)].text = ''
            sibling[(- 1)].insert(0, p)
        self.parser.parseChunk(sibling[(- 1)], block)
    else:
        self.create_item(sibling, block)
    self.parser.state.reset()

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