import re


def quoted_split(text: str, delimiter: str) -> list[str]:
    """Split a string by 'delimiter', ignoring it if it is inside quotations.

    Returns a list of strings with results.
    Consecutive delimiters are returned as empty string.
    """

    args = []
    # gets first part
    re_first = re.compile(
        r"^(?:\s*([\"\'])(?:(?!\1).|\\\1)*(?<!\\)\1\s*|[^" + delimiter + r"]?)+"
    )

    while len(text):
        match = re.search(re_first, text)

        if not match:
            break
        text = text[match.end(0) + 1 :]

        # remove spaces
        arg = match[0].strip()

        args.append(arg)

    return args