

def get_items(self, block):
    ' Break a block into list items. '
    items = []
    for line in block.split('\n'):
        m = self.CHILD_RE.match(line)
        if m:
            if ((not items) and (self.TAG == 'ol')):
                INTEGER_RE = re.compile('(\\d+)')
                self.STARTSWITH = INTEGER_RE.match(m.group(1)).group()
            items.append(m.group(3))
        elif self.INDENT_RE.match(line):
            if items[(- 1)].startswith((' ' * self.tab_length)):
                items[(- 1)] = ('%s\n%s' % (items[(- 1)], line))
            else:
                items.append(line)
        else:
            items[(- 1)] = ('%s\n%s' % (items[(- 1)], line))
    return items

dataset/ETHPy150Open darcyliu/storyboard/markdown/blockprocessors.py OListProcessor.get_items/original