

def looseDetab(self, text, level=1):
    ' Remove a tab from front of lines but allowing dedented lines. '
    lines = text.split('\n')
    for i in range(len(lines)):
        if lines[i].startswith(((' ' * self.tab_length) * level)):
            lines[i] = lines[i][(self.tab_length * level):]
    return '\n'.join(lines)

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