(input, errors='strict', *args)
return '\n'.join(out), l
Finds indent and add a colon on previous line
Finds indent and add a colon on previous line
Finds indent and add a colon on previous line
def decode(input, errors='strict', *args):
    """Finds indent and add a colon on previous line"""
    u, l = codecs.utf_8_decode(input, errors, True)
    out = []
    offset = 0
    for line in u.split('\n'):
        if line.strip():
            indent = len(line) - len(line.lstrip())
            if indent > offset:
                i = -1
                while not out[i].strip() and len(out) > -i:
                    i -= 1

                if out[i].rstrip()[-1] != ':':
                    out[i] += ':'
            offset = indent
        out.append(line)
    return '\n'.join(out), l
def decode ( input , errors = 'strict' , * args ) : u , l = codecs . utf_8_decode ( input , errors , True ) out = [ ] offset = 0 for line in u . split ( '\n' ) : if line . strip ( ) : indent = len ( line ) - len ( line . lstrip ( ) ) if indent > offset : i = - 1 while not out [ i ] . strip ( ) and len ( out ) > - i : i -= 1 if out [ i ] . rstrip ( ) [ - 1 ] != ':' : out [ i ] += ':' offset = indent out . append ( line ) return '\n' . join ( out ) , l