From 5268620470bbc1c52043af9dba41a247980cc2e6 Mon Sep 17 00:00:00 2001 From: teahubxyz Date: Wed, 21 Oct 2026 22:23:48 +0000 Subject: [PATCH] split-post: the regex-literal false positive (crackle) also points at index.html in the intermediate steps Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Dhu3iHseRewQ2WpBSVLokG --- tools/split-post.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/split-post.py b/tools/split-post.py index 14a4b2b..52e1fd8 100644 --- a/tools/split-post.py +++ b/tools/split-post.py @@ -14,7 +14,7 @@ for p in files: j = t.index("\n}\n", t.index("async function veniceFetch")) + 3 t = t[:j] + "/* the fetcher is injectable: the harness fragments stub it (render.setFetcher); every call goes through venice() */\nlet fetcher = veniceFetch;\nexport const setFetcher = (fn) => { fetcher = fn || veniceFetch; };\nexport const venice = (...a) => fetcher(...a);\n" + t[j:] t = t.replace("\nasync function makeTone(", "\nexport async function makeTone(").replace("\nasync function makeNoise(", "\nexport async function makeNoise(") - t = t.replace('import { crackle } from "./player.js";\n', "") # a regex literal in noiseSpec mentions crackle; not a use + t = re.sub(r'import \{ crackle \} from "\./(player\.js|index\.html)";\n', "", t) # a regex literal in noiseSpec mentions crackle; not a use if t != s: p.write_text(t) h = ROOT / "index.html"; s = h.read_text() s = s.replace('', '') # after the module, which is deferred too