def extract_title_from_text(text: str) -> str:
    """Extract and return the title line from a text written in Markdown.

    Returns the first line of the original text, minus any header markup ('#') at the start
    of the line.
    """
    firstline = text.split('\n', 1)[0]
    return firstline.lstrip('# ')