---
description: "Safely syntax-check the module script embedded in www/post.html without heredoc chaining issues"
---

Run the following two commands exactly, as separate lines:

python3 -c 'import re,pathlib;html=pathlib.Path("www/post.html").read_text(encoding="utf-8");m=re.search(r"<script type=\"module\">([\\s\\S]*?)</script>\\s*</body>",html);assert m,"module script not found in post.html";pathlib.Path("build/post-module-check.mjs").write_text(m.group(1),encoding="utf-8");print("extracted module script to build/post-module-check.mjs")'

node --check build/post-module-check.mjs
