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:
parent
dda8ffa133
commit
1b3fff1e0d
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user