commit 82239866fabe9405714c5b3efa0b0b7cd958352d
parent 0c160da148cde9ca93e3900015661c926c949899
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 3 Nov 2026 11:13:11 -0500
umtool: a shouted question ends "?!" (the operator: "miserable" … yelled)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/umtool/report-to-video/post-narration.mjs b/umtool/report-to-video/post-narration.mjs
@@ -357,7 +357,7 @@ export function speakShouts(script) {
shouted = true;
return word.toLowerCase().replace(/^i(?=')|^i$/, "I");
});
- return shouted ? said.replace(/\.(["')\]]*)\s*$/, "!$1") : said;
+ return shouted ? said.replace(/\.(["')\]]*)\s*$/, "!$1").replace(/\?(["')\]]*)\s*$/, "?!$1") : said;
}).join("");
}
diff --git a/umtool/report-to-video/post-narration.test.mjs b/umtool/report-to-video/post-narration.test.mjs
@@ -179,6 +179,7 @@ test("SCRIPTS ARE THE POST, VERBATIM: cleaned for pronunciation only, never an e
// shouted words are said (lowercased) and the sentence ends "!"; acronyms are left spelled
assert.equal(speakShouts("MR. OBVIOUS IS RIGHT AGAIN. I carry the FBI. You are NOT unarmed. That is BS."), "Mister obvious is right again! I carry the FBI. You are not unarmed! That is BS.");
assert.equal(speakShouts("<sigh> I'M NOT GONNA STOP."), "<sigh> I'm not gonna stop!");
+ assert.equal(speakShouts("the most MISERABLE people, what kind of life?"), "the most miserable people, what kind of life?!");
assert.equal(speakableText("one\ntwo\n\nthree"), "one. two.\n\nthree");
const long = Array.from({ length: 150 }, (_, i) => `w${i}`).join(" ") + ". The end.";
const d = draftScript(long);