from typing import Dict
import re


def split_lede(caller) -> Dict[str, str]:
    """Parses HTML with regular expressions.

    Splits the first paragraph of a news article from the rest of the article. Assumes that caller
    starts with a <p> block and no other (non-whitespace) characters.

    Args:
        caller (str): HTML source beginning with a <p> block

    Returns:
        Dict[str,str]:
            `lede`: First <p> of `caller`, **excluding** the surrounding tags
            `text`: Rest of the article (everything after the first </p>)
    """
    lede_re = re.compile(r"^\s*<p>(.*?)</p>", flags=re.DOTALL)
    match = lede_re.match(caller)

    if match is None:
        print(caller)
        return {"lede": "", "text": caller}
    else:
        return {"lede": match[1], "text": caller[match.end(0) :]}