import re


def normalize_pandoc(text: str) -> str:
    """
    Series of normalization steps for pandoc generated text

    Parameters
    ----------
    text : str
        Pandoc text

    Returns
    -------
    str
        Normalized pandoc text
    """
    text_norm = re.sub(r"(\r\n)", '\n', text)
    text_norm = re.sub(r"( {4})", '\t', text_norm)
    text_norm = re.sub(r'(-----\n\nGenerated by.*)', '----', text_norm)
    return text_norm