nyousefi / Fountain

An open source implementation of the Fountain screenplay formatting language.

Home Page:http://fountain.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spec shouldn't rely on trailing whitespace

stuartpb opened this issue · comments

(Is this the place to raise issues with Fountain's syntax? Anyway, I'm doing it.)

Looking over http://fountain.io/syntax I notice that the suggested way to avoid automatic categorization is to include two trailing spaces on a line.

Relying on trailing whitespace is bad, for a few reasons- not the least of which is that lots of stuff, including the editor I use every day, is set to strip trailing whitespace on file save (preserving trailing whitespace is a great way to introduce infuriating, invisible diffs). Making the non-syntactic line breaks whitespace-indistinguishable also just plain makes the Fountain doc hard to read - if line breaks are my single cue for the end of dialogue, I'm going to be totally thrown when they're to mean something completely different.

Maybe add another rule that lets lines end at the last printable character? I'd suggest stripping empty pairs of parentheses at the end of a line, like this:

DEALER
Ten.
Four.
Dealer gets a seven.
()
Hit or stand sir?

Or this:

ROBERT
But, wait- if I'm not- and this is- but that's- oh my-

IN A FLASH OF SMOKE, ROBERT CEASES TO BE A CHARACTER. ()
This was his own fault for messing with the Syntax of Life.

I'm thinking empty parentheses because it kind of resembles what it kind of represents, a completely invisible, nigh-imperceptible, meta (beat).

If, for some unfathomable reason, a line needs an empty set of parentheses at the end, they could be backslash escaped, like how **non-emphatic asterisks__ are:

NEO, bent over the terminal, finally realizing his destiny, uses every last ounce
of his strength to deliver the last salvation of humanity:

    (XCU on screen)
  Matrix.free\(\)

Also, continuing from that last idea, it should be possible (I don't know if this works with the current spec or not) for an action to start with an escaped leading right-angle-bracket, so we can represent things like actions at command prompts with:

\> new Matrix.enslavement(Machines)

Okay, I jumped to write this before I got to the section for Boneyard. I suppose this could also work as a (moderately ugly) workaround without having to mess with the spec:

DEALER
Ten.
Four.
Dealer gets a seven.
  /**/
Hit or stand sir?

Still curious about the backslash-escaping angle brackets, though.

I completely agree with you, and you articulated this issue wonderfully. I'll push this up the food chain and try and get a change here. Thanks!

I have an idea for solving this issue, but want to be sure I understand the problem.

Using two spaces at the end of a line is a workaround. The problem is recognizing action lines as action when the text is preceded by a single newline, or even \n\s*\n, i.e., a problem that only occurs with single vertically spaced action lines. Is this correct?

I'd like to revive this. Having some way of explicitly marking dialogue would be really useful. Trailing space is a little tricky to enforce.

For what it's worth, in Markdown, the alternative to the thing whitespace offers is to explicitly write <br> (as the canonical Markdown implementation is designed to intermingle with HTML); perhaps <br> could be explicitly recognized as a token in Fountain?