From a5cde8693f18fa97176127da530bb7ee9aa4d210 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Tue, 12 Sep 2023 16:01:41 +0200 Subject: [PATCH] [JavaScript] Add osascript to shebang (#3832) 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. --- JavaScript/JavaScript.sublime-syntax | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/JavaScript/JavaScript.sublime-syntax b/JavaScript/JavaScript.sublime-syntax index f7df3a3190..1871a4c47b 100644 --- a/JavaScript/JavaScript.sublime-syntax +++ b/JavaScript/JavaScript.sublime-syntax @@ -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_]'