

def reindent(self, raw, match):
    prev_newline = '(?<=\\n)'
    lowest_indent = (- 1)
    for l in re.split('\\n', raw):
        indent = (len(l) - len(l.strip()))
        if ((lowest_indent == (- 1)) or (lowest_indent > indent)):
            lowest_indent = indent
    indent = (len(match.group(1)) * self.indent_char)
    return (indent + re.sub(prev_newline, indent, re.sub((prev_newline + (lowest_indent * self.indent_char)), '', raw.lstrip())))

dataset/ETHPy150Open akalongman/sublimetext-codeformatter/codeformatter/lib/htmlbeautifier/__init__.py Beautifier.reindent/original