From dd52dd4b27a36847b3139ed20160eb85a3d506ce Mon Sep 17 00:00:00 2001 From: Chris Dumas Date: Thu, 15 Oct 2026 09:03:49 +0000 Subject: [PATCH] Preserve shot text when adding markers --- web/sequence_prompt_builder.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/sequence_prompt_builder.js b/web/sequence_prompt_builder.js index 2839940..5e5c53f 100644 --- a/web/sequence_prompt_builder.js +++ b/web/sequence_prompt_builder.js @@ -90,7 +90,12 @@ function configure(node) { }; const syncPrompt = (clip, value) => { const text = String(value || ""); - const marks = [...text.matchAll(/\[Shot\s+(\d+)\][^\n]*(?:\n|$)/gi)]; + // The shot description starts on the same line as the marker in the + // CSGlide-style editor. Only consume the marker prefix through its + // timestamp comma; consuming the whole line would discard text such + // as `[Shot 1] At 00:00.000, the character walks...` when a new shot + // is added and the marker scaffold is rebuilt. + const marks = [...text.matchAll(/\[Shot\s+(\d+)\]\s+At\s+[^,\n]+,\s*/gi)]; if (!marks.length) { if (clip.slots[0]) clip.slots[0].text = text.trim(); return; } marks.forEach((mark, index) => { const slotIndex = Number(mark[1]) - 1;