ifrost / afterwriting-labs

Post-processing for Fountain screenplays
http://www.afterwriting.com
228 stars 38 forks source link

All-caps action line without preceding blank parsed as character #48

Closed rnkn closed 8 years ago

rnkn commented 8 years ago

In this example the all-caps action line is parsed as a character element when I think it should be parsed as action (since there is no preceding blank line).

Her hands beneath her.
Feeling for anything.
SHARDS OF BROKEN GLASS.
She grabs a SHARD.
Holds tight. Slicing her palms.

Contrast with:

Her hands beneath her.
Feeling for anything.

SHARDS OF BROKEN GLASS.
She grabs a SHARD.
Holds tight. Slicing her palms.

which should be parsed as character.

ifrost commented 8 years ago

Thanks! Looks like a bug, I'll have a look at this.

If you need a quick fix you can force action element with a !:

Her hands beneath her.
Feeling for anything.
!SHARDS OF BROKEN GLASS.
She grabs a SHARD.
Holds tight. Slicing her palms.
ifrost commented 8 years ago

Fixed in https://github.com/afterwriting/aw-parser/issues/2

rnkn commented 8 years ago

How does the Node package get updated?

ifrost commented 8 years ago

The bug was in parser.js but I have moved the parsing to a separate project - aw-parser (it's published to npm). It's now a dependency in afterwriting-labs package.json.

rnkn commented 8 years ago

Ah I see, I kept installing from npm which is still at 1.2.6 instead of cloning and installing with $ npm install -g .

Now I'm at 1.2.28 and everything is rosy. Thanks!

ifrost commented 8 years ago

Oh yeah, I haven't updated npm package for a while because it's actually used only for the client awc.js which hasn't changed since then.

ifrost commented 8 years ago

But it makes sense to update it now so it contains the fix! :)