#!/usr/bin/env python3 """ Remove per-page blocks (including surrounding blank lines) STYLE_BLOCK_RE = re.compile(r"\s*]*>.*?", re.DOTALL | re.IGNORECASE) # Remove any existing Google Fonts tags GFONTS_LINK_RE = re.compile( r'\s*]+fonts\.googleapis\.com[^>]*>', re.IGNORECASE, ) CSS_LINK = ' ' def process_file(filepath: str) -> bool: with open(filepath, encoding="utf-8") as f: original = f.read() content = original # Strip