lmparppei / Beat

Beat - a simple and elegant screenwriting app for macOS
Other
175 stars 30 forks source link

Parser interprets notes based on dialog parsing rules #78

Closed ftolsson closed 3 years ago

ftolsson commented 3 years ago

Admittedly not a biggie -- but a small step closer to perfection: It would be great if the parser knew that a [[script note]] is a note instead of checking for caps (and/or any other formatting rules).

Typing a note will almost always indent it into character position following the first letter inside the note (seemingly using a third-letter-is-a-cap rule -- which will quite likely always hold true as long as the user holds shift for the first letter of the first word of the note). Hopefully, it would not be too hard to make an exception to the third-letter rule if the first two characters are brackets.

Also, a multiline note of the type

[[NOTE TO SELF:

1. Make things better

2. Rewrite all bad things]] 

wil be formatted as if it were a long piece of dialogue. This latter example happens not only when parsing-on-the-fly as we type, but will persist when opening a saved document too -- so perhaps two different issues?

lmparppei commented 3 years ago

Absolutely. I will fix this in 1.91.4.

lmparppei commented 3 years ago

Fixed in 1.91.4 via NSString+CharacterControl category. Pretty much a brute-force method and not at all elegant, but seems to work. image