

def detab(self, text):
    ' Remove a tab from the front of each line of the given text. '
    newtext = []
    lines = text.split('\n')
    for line in lines:
        if line.startswith((' ' * self.tab_length)):
            newtext.append(line[self.tab_length:])
        elif (not line.strip()):
            newtext.append('')
        else:
            break
    return ('\n'.join(newtext), '\n'.join(lines[len(newtext):]))

dataset/ETHPy150Open darcyliu/storyboard/markdown/blockprocessors.py BlockProcessor.detab/original