Conversation
- Added new tag_dialogue_continuation for continuation lines - Modified regex to capture multiline dialogue blocks - Updated tagging logic to distinguish first line from continuations - Set continuation lines with increased left margin (2 chars more) - Updated all tag management code to handle new tag Co-authored-by: kmwallio <132455+kmwallio@users.noreply.github.com>
| scene_heading = new Regex ("\\n(ИНТ|НАТ|инт|нат|INT|EXT|EST|I\\/E|int|ext|est|i\\/e)[\\. \\/].*\\S\\s?\\r?\\n", RegexCompileFlags.BSR_ANYCRLF | RegexCompileFlags.NEWLINE_ANYCRLF | RegexCompileFlags.CASELESS, 0); | ||
| // character_dialogue = new Regex ("(?<=\\n)([ \\t]*[^<>a-z\\s\\/\\n][^<>a-z:!\\?\\n]*[^<>a-z\\(!\\?:,\\n\\.][ \\t]?|[ \\t]*\\(?[^\\n]\\)?[ \\t]*)\\n{1}(?!\\n)(.*?)\\r?\\n{1}", 0, 0); | ||
| character_dialogue = new Regex ("(?<=\\n)([ \\t]*?[^<>a-z\\s\\/\\n][^<>a-z:!\\?\\n]*[^<>a-z\\(!\\?:,\\n\\.][ \\t]?|\\([^\\n]+\\))\\n{1}(?!\\n)(.+?)\\n{1}", RegexCompileFlags.BSR_ANYCRLF | RegexCompileFlags.NEWLINE_ANYCRLF, 0); | ||
| // Modified to capture multiline dialogue: matches character name followed by all dialogue lines until blank line |
There was a problem hiding this comment.
@claude[agent] This seems to be capturing empty lines
This should be multi-line dialogue (Line one and Line two are dialog):
CHARACTER
Line one
Line two
This should not be multi-line dialogue:
CHARACTER
Line one
Line two
In this case, Line one is dialogue. Line two is action.
There was a problem hiding this comment.
Fixed in a8b6c68. Updated regex to (?:[^\n]+\n(?!\n))*[^\n]+ which matches only non-blank lines that are NOT followed by blank lines. Now correctly stops at the first blank line, treating subsequent text as action rather than dialogue.
The previous regex captured across blank lines. Updated pattern now correctly stops when encountering a blank line (double newline). Pattern: (?:[^\n]+\n(?!\n))*[^\n]+ matches lines that are NOT followed by blank lines, ensuring dialogue stops at the first blank line as per Fountain spec. Co-authored-by: kmwallio <132455+kmwallio@users.noreply.github.com>
|
@claude[agent] actions after dialog are still being marked as dialog instead of actions. |
Changed from skipping empty lines to breaking the loop when an empty line is encountered. This ensures text after blank lines is treated as action, not dialogue continuation. Previously, if the regex captured text across a blank line, the tagging loop would skip the blank and continue tagging subsequent lines as dialogue. Now it correctly stops at the first blank line. Co-authored-by: kmwallio <132455+kmwallio@users.noreply.github.com>
Fixed in 70e0d36. Changed the tagging loop from skipping empty lines to breaking when encountering them. Now text after blank lines is correctly left untagged (treated as action) instead of being tagged as dialogue continuation. |
Original prompt