-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
There's an error parsing one of Fountain's sample files:
125 | text = text.trim();
126 | if (rules_1.rules.parenthetical.test(text)) {
127 | return [...p, new ParentheticalToken(text)];
128 | }
129 | if (rules_1.rules.lyrics.test(text)) {
130 | if (previousToken.type === 'lyrics') {
^
TypeError: undefined is not an object (evaluating 'previousToken.type')
Please submit an issue to https://github.com/jonnygreenwald/fountain-js/issues
at <anonymous> (node_modules/fountain-js/dist/token.js:130:25)
at reduce (1:11)
at new DialogueBlock (node_modules/fountain-js/dist/token.js:116:34)
at <anonymous> (node_modules/fountain-js/dist/lexer.js:85:39)
at reduce (1:11)
at tokenizeScript (node_modules/fountain-js/dist/lexer.js:63:36)
at tokenize (node_modules/fountain-js/dist/lexer.js:35:36)
at parse (node_modules/fountain-js/dist/fountain.js:15:67)
Here's the file:
I believe a simple null check at that if branch will fallback to correct behavior, but am not familiar enough with the code base to be sure that that is the case
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels