def METHOD_NAME(entry: str) -> str:
    # escape macro references and macro/shell/expression expansions
    # that could break spec file parsing
    entry = re.sub(r"(?<!%)%(?=(\w+|[{[(]))", "%%", entry)
    # prepend asterisk at the start of a line with a space in order
    # not to break identification of entry boundaries
    return re.sub(r"^[*]", " *", entry, flags=re.MULTILINE)