lmparppei / Beat

Beat - a simple and elegant screenwriting app for macOS
Other
169 stars 29 forks source link

Bug in Preview / PDF creation: Space on empty line makes empty line disappear #80

Closed ftolsson closed 2 years ago

ftolsson commented 2 years ago

Just exported a PDF and found a chunk of action text to be longer than expected. Reviewing it in Beat, I did have an empty line in the middle of that chunk. However, on closer examination, that empty line had a (one) space on it.

Removing the space, the preview/pdf will look as expected, namely with a white line in the middle.

It seems as if as of right now (recently introduced?) if a space has been left behind on an empty line, the line will be discarded.

This even holds true between different element types (such as action and character) as in the following example:

This is a piece of action.
[space]
PERSON
Hello, look at me talking.

In the edit window, the above will render as expected with PERSON indented to character position and with dialog below it. In PDF/preview, all three lines (excluding the one with the space which disappears) are flush left and adjacent.

lmparppei commented 2 years ago

Fixed with a simple conditional in parser.