Skip to content

Commit 783a19b

Browse files
committed
Fix shebang patterns
Use same patterns for both, first_line_match and highlighting. Note: This commit does not use variables for backward compatibility reasons.
1 parent 0cca127 commit 783a19b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CoffeeScript.sublime-syntax

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ file_extensions:
1515

1616
first_line_match: |-
1717
(?xi:
18-
^ \#! .* \b(coffee(-script)?)\b # shebang
19-
| ^ \s* \# .*? -\*- .*? \bcoffee(-script)?\b .*? -\*- # editorconfig
18+
^ \#! .* \b(coffee(-script)?(?:\d(?:\.\d+)?)?)\b # shebang
19+
| ^ \s* \# .*? -\*- .*? \bcoffee(-script)?(?:\d(?:\.\d+)?)?\b .*? -\*- # editorconfig
2020
)
2121
2222
##############################################################################
@@ -87,7 +87,7 @@ contexts:
8787
- meta_include_prototype: false
8888
- meta_scope: comment.line.shebang.coffee
8989
# Note: Keep sync with first_line_match!
90-
- match: coffee(?:\d(?:\.\d+)?)?{{break}}
90+
- match: coffee(-script)?(?:\d(?:\.\d+)?)?{{break}}
9191
scope: constant.language.shebang.coffee
9292
- match: $\n?
9393
pop: 1

0 commit comments

Comments
 (0)