from typing import Union
from typing import List


def find_shortest_indent(
    text: Union[str, List[str]], ignore_empty: bool = True, delimiter: str = "\n"
) -> int:
    """ Given a block of text, find the shortest indent in use.
        If there is a line with an indent of 0, skips the loop and returns 0.
        If `ignore_empty` is set, lines that are empty are skipped.
        If a shortest indent can't be determined, returns 0.
    """

    if isinstance(text, str):
        text = text.split(delimiter)

    indent_sizes = []

    for line in text:
        if ignore_empty and line.strip() == "":
            continue

        count = 0
        for char in line:
            if char.isspace():
                count += 1
            else:
                break

        if count == 0:
            return 0

        indent_sizes.append(count)

    if not indent_sizes:
        return 0

    return min(indent_sizes)