Skip to content

Commit

Permalink
[JavaScript] Add osascript to shebang (#3832)
Browse files Browse the repository at this point in the history
This commit updates `first_line_match` and shebang scope to automatically apply
JavaScript syntax to apple scripts with:

    #!oascript -l JavaScript

This is a follow-up of #3829.
  • Loading branch information
deathaxe authored Sep 12, 2023
1 parent b58ab9d commit a5cde86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions JavaScript/JavaScript.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ file_extensions:

first_line_match: |-
(?xi:
^ \#! .* \b(?:node|js)\b # shebang
^ \#! .* \b(?:node|js|osascript\s+-l\s+JavaScript)\b # shebang
| ^ \s* // .*? -\*- .*? \b(?:js|javascript)\b .*? -\*- # editorconfig
)
variables:
shebang_lang: \b(?:node|js)\b
shebang_lang: \b(?:node|js|osascript\s+-l\s+JavaScript)\b

bin_digit: '[01_]'
oct_digit: '[0-7_]'
Expand Down

0 comments on commit a5cde86

Please sign in to comment.