fix(sonar): ACT/SCENE heading regex no longer matches empty numeral (javascript:S5842)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mARTin-B78 2026-10-06 11:30:12 +02:00
parent dda8ffa133
commit 1b3fff1e0d

View File

@ -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;