eprovst / wrap

A Fountain export tool with some extras...
GNU General Public License v3.0
62 stars 8 forks source link

Notes produce newlines when they shouldn't #35

Closed atoav closed 5 years ago

atoav commented 5 years ago

Notes on their own line...

[[foo]]

...are invisible in the output (as expected), but produce a newline. This leads to inconsistent formating and is very likely not the way this was meant to work.

To Reproduce

Steps to reproduce the behavior:

  1. Create a scene Header
  2. Write ten lines of [[ foo ]]
  3. Write some normal scene text
  4. Convert to pdf via wrap pdf -p --use-courier-prime {infile} -o {outfile}
INT. OFFICE - DAY #1#
= Scene summary

[[foo]]
[[foo]]
[[foo]]
[[foo]]
[[foo]]
[[foo]]
[[foo]]
[[foo]]
[[foo]]
[[foo]]

Something weird happened

Expected behavior

Notes shouldn't produce newlines if they are not visible

Screenshots

Resulting PDF looks like this ↓ fountain ↑ These newlines are gone if you remove the lines with [[foo]] and correspond to the number of notes

Version

Additional Info A quickfix for me is to preprocess the fountain and remove all lines that only contain a note, but it would be better to have it fixed in wrap. Edit: Here is what I used:

wrap pdf -p --use-courier-prime <(sed -n '/^\[\[.*\]\]$/!p' ./script.fountain) -o script.pdf
eprovst commented 5 years ago

Thanks for the report!

With rewriting the parser this issue seems to be fixed in the current development version, I'll see if it can already be published :)

eprovst commented 5 years ago

Fixed in latest version :slightly_smiling_face: