Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forced scene headers are scoped and highlighted as numbers #32

Closed
zoltair opened this issue Jun 4, 2019 · 1 comment
Closed

Forced scene headers are scoped and highlighted as numbers #32

zoltair opened this issue Jun 4, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@zoltair
Copy link

zoltair commented Jun 4, 2019

Forcing a scene header by starting the line with a period (.) causes the whole line to be scoped as constant.numeric.scene.fountain instead of keyword.other.class. I propose replacing the scene heading regular expression (on line 265 of fountain.tmlanguage) with this instead:

<string>(?i)^([.](?=[0-9a-z])|(?:[*]{0,3}_?)(?:int|ext|est|int[.]?\/ext|i[.]?\/e)[. ])(.+?)(#[-.0-9a-z]+#)?$</string>

That scopes the scene header the same whether it starts with a period or with "INT", "EXT", etc. As a bonus, it also scopes a trailing scene number (alphanumeric characters surrounded by hash signs) as constant.numeric.scene.fountain, which I assume was the intent at some point.

@piersdeseilligny piersdeseilligny added the bug Something isn't working label Jun 5, 2019
@piersdeseilligny
Copy link
Owner

Fixed in 1.4.0, currently live in the marketplace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants