import re
from shared.config import config

def _norm_title_key(t: str) -> str:
    t = (t or "").strip().lower()
    t = re.sub(r":\s*$", "", t)
    t = re.sub(r"\s+", " ", t)
    return t

def is_blacklisted_heading(title: str) -> bool:
    return _norm_title_key(title) in  [s.lower() for s in config()["blacklist"]["product-details"]]
