From b123b9e213a848b1df6dacc7b4e75a24ea8902ca Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 13 Nov 2025 12:30:28 +0100 Subject: [PATCH] Preserve `script` tags in JS minify (#22678) --- docs/build_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build_docs.py b/docs/build_docs.py index 48f095e8..23106a63 100644 --- a/docs/build_docs.py +++ b/docs/build_docs.py @@ -263,7 +263,7 @@ def remove_macros(): # Precompiled regex patterns for minification HTML_COMMENT = re.compile(r"") -HTML_PRESERVE = re.compile(r"<(pre|code|textarea)[^>]*>[\s\S]*?", re.IGNORECASE) +HTML_PRESERVE = re.compile(r"<(pre|code|textarea|script)[^>]*>[\s\S]*?", re.IGNORECASE) HTML_TAG_SPACE = re.compile(r">\s+<") HTML_MULTI_SPACE = re.compile(r"\s{2,}") HTML_EMPTY_LINE = re.compile(r"^\s*$\n", re.MULTILINE)