From 1b3fff1e0dec1421b886df53b3b3274ec4bae54b Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Tue, 6 Oct 2026 11:30:12 +0200 Subject: [PATCH] fix(sonar): ACT/SCENE heading regex no longer matches empty numeral (javascript:S5842) Co-Authored-By: Claude Sonnet 5.5 --- static/js/rehearser-parse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/rehearser-parse.js b/static/js/rehearser-parse.js index c6bbbf1..1f2b9d6 100644 --- a/static/js/rehearser-parse.js +++ b/static/js/rehearser-parse.js @@ -105,7 +105,7 @@ function parseScript(text) { } // Theatre ACT heading - if (/^ACT\s+(I{1,4}|V?I{0,3}|[1-9][0-9]?|ONE|TWO|THREE|FOUR|FIVE|SIX|SEVEN|EIGHT|NINE|TEN)(\b.*)?$/i.test(line)) { + if (/^ACT\s+(I{1,4}|V?I{1,3}|V|[1-9][0-9]?|ONE|TWO|THREE|FOUR|FIVE|SIX|SEVEN|EIGHT|NINE|TEN)(\b.*)?$/i.test(line)) { flushDialog(); flushAction(); result.push({ type:'act', speaker:'', text:line.toUpperCase(), isDirection:true }); state = 'action'; currentSpeaker = null; @@ -113,7 +113,7 @@ function parseScript(text) { } // Theatre SCENE heading - if (/^SCENE\s+(I{1,4}|V?I{0,3}|[1-9][0-9]?|ONE|TWO|THREE|FOUR|FIVE|SIX|SEVEN|EIGHT|NINE|TEN)(\b.*)?$/i.test(line)) { + if (/^SCENE\s+(I{1,4}|V?I{1,3}|V|[1-9][0-9]?|ONE|TWO|THREE|FOUR|FIVE|SIX|SEVEN|EIGHT|NINE|TEN)(\b.*)?$/i.test(line)) { flushDialog(); flushAction(); result.push({ type:'scene', speaker:'', text:line.toUpperCase(), isDirection:true }); state = 'action'; currentSpeaker = null;