piersdeseilligny / betterfountain

A screenwriting app integrated into visual studio code
https://marketplace.visualstudio.com/items?itemName=piersdeseilligny.betterfountain
MIT License
358 stars 55 forks source link

carriage return in notes not working #172

Open shauryashaurya opened 2 years ago

shauryashaurya commented 2 years ago

As always betterfountain is wonderful to use. Thank you!

I recently ran into an issue and wanted to bring it to your attention (I can try my hand at a pull req if am able to figure out where/how to fix this - your guidance would be very welcome here)

A single line note works perfectly, however a multi-line note (carriage return) does not. for e.g., [[This note works perfectly]]

but

[[This is not recognized as

a note]]

Per the specification, carriage returns are supported in notes.

Thanks again for all your work! So awesome! :)

shauryashaurya commented 2 years ago

Some more info:

Seems like the note_inline regular expression in afterwriting-parser.ts is working fine by itself.
There may be a conflict with the rest of the parser.

Here are the tests I ran:
Testing the note_inline regex

piersdeseilligny commented 2 years ago

Hi, thanks for reporting this and apologies for the slow response!

It's normal for

[[This is
not recognized
as

a
note]]

to not be recognized as a note (notes can't contain empty lines), however the following:

[[this is a note
across several lines]]

really should be. I'm not sure what's happening here, but I'il investigate.