import base64


def protect(match):
    """
    Function for re.sub() that encodes the first match as base64 to prevent any further
    minification from taking place.  Used, for example, to protect multi-line string literals.
    """
    return (b'\x01\x02' + base64.b64encode(match.group(1).encode()) + b'\x01\x03').decode()