Closed noquierouser closed 7 years ago
Thanks for reporting it. It'd be very helpful if you could attach a sample file. I'll try to have a look at it this weekend.
I tried to reproduce it to no avail so I'll need a sample fountain file.
Line numbers in the stack trace you pasted seem to be off - what version are you using? Did you modify liner.js directly in node_modules by any chance?
@ifrost I'm using afterwriting 1.3.5 from releases section, but this happened too with the npm version (1.2.28).
Here's the file that it's giving me the issue.
Edit: Link deleted
Thanks!
So the problem is with "split_dialogue" option. The way it works is: when splitting the script into pages it keeps dialogue as one block and tries to find first "breaking point"above (between action and when the dialogue starts).
Your script, however, has a very long dialogue, covering more than one page. In such case the logic for splitting falls short as it's not able to find the breaking point (there's no way to keep the dialog on one page without breaking it).
To fix it I added a check that if split_dialogue == false and no breaking line is found - it simply breaks at the end of the page.
Please check the latest version.
Note: I think it's still not ideal as in case of very long dialogues, ideally one would like to force breaking at the end of the page without having the "lookup" for a breaking line above the dialogue as it may leave the script with blank patches. The solution could be to have 3 different options for splitting dialogue (1 - forced, 2 - automatic with "CONTINUED/MORE", and 3 - "block" mode to keep the dialogue as one block if possible). At the moment if split_dialogue == false it works in (3) "block" mode, or when split_dialogue == true it splits automatically adding "CONTINUED/MORE" (2). There's not way to force the dialogue to always split wherever it falls on the page.
I can confirm it's working now. Thanks so much for the quick response and the awesome fixing. You even updated the npm package! 👍
Regarding your note, I think your approach might be suitable for the use cases you propose. But I think it may break retrocompatibility if the option values change so drastically. Also, maybe searching for double spaces, as I did in my script, might be useful for breaking long dialogs too.
The CLI utility is throwing the following error while trying to compile my fountain file:
Now, apparently this might be because of a setting in my settings file, because when I remove the
--config
argument the file compiles just fine.My actual settings file is this:
But, after I removed
print_title_page
,print_header
,print_footer
,print_watermark
,split_dialogue
,double_space_between_scenes
andeach_scene_on_new_page
, the file compiled without issues.I don't know what might be triggering this error, but if necessary, I can provide my fountain file for testing.