pyrser/fmt.py
def catend(dst: str, src: str, indent) -> str:
    """cat two strings but handle \n for tabulation"""
    res = dst
    txtsrc = src
    if not isinstance(src, str):
        txtsrc = str(src)
    for c in list(txtsrc):
        if len(res) > 0 and res[-1] == '\n':
            res += (indentable.char_indent * indentable.num_indent) * \
                   (indent - 1) + c
        else:
            res += c
    return res
def catend(dst: str, src: str, indent) -> str:
    """cat two strings but handle \n for tabulation"""
    res = dst
    txtsrc = src
    if not isinstance(src, str):
        txtsrc = str(src)
    for c in list(txtsrc):
        if len(res) > 0 and res[-1] == '\n':
            res += (indentable.char_indent * indentable.num_indent) * \
                   (indent - 1) + c
        else:
            res += c
    return res
cat two strings but handle \n for tabulation