%YAML 1.2 --- name: JavaScript scope: source.js version: 2 extends: JavaScript (Plain).sublime-syntax file_extensions: - js - mjs - cjs - htc first_line_match: |- (?xi: ^ \#! .* {{shebang_language}} # shebang | ^ \s* // .*? -\*- .*? \b(?:js|javascript)\b .*? -\*- # editorconfig ) contexts: literal-string-template-begin: - meta_prepend: true - include: literal-string-template-css - include: literal-string-template-html - include: literal-string-template-js - include: literal-string-template-json - include: literal-string-template-sql literal-string-template-css: - match: (?i:((/\*)\s*css\s*(\*/))|(css))\s*(({{tagged_template_quote_begin}}){{trailing_wspace}}?) captures: 1: comment.block.js 2: punctuation.definition.comment.begin.js 3: punctuation.definition.comment.end.js 4: variable.function.tagged-template.js 5: meta.string.template.js string.quoted.other.js 6: punctuation.definition.string.begin.js set: literal-string-template-css-body literal-string-template-css-body: - meta_include_prototype: false - meta_content_scope: meta.string.template.js source.css.embedded.js - include: literal-string-template-end - include: scope:source.css.js-template apply_prototype: true literal-string-template-html: - match: (?i:((/\*)\s*(?:html|svg)\s*(\*/))|(html|svg))\s*(({{tagged_template_quote_begin}}){{trailing_wspace}}?) captures: 1: comment.block.js 2: punctuation.definition.comment.begin.js 3: punctuation.definition.comment.end.js 4: variable.function.tagged-template.js 5: meta.string.template.js string.quoted.other.js 6: punctuation.definition.string.begin.js set: literal-string-template-html-body literal-string-template-html-body: - meta_include_prototype: false - meta_content_scope: meta.string.template.js text.html.embedded.js - include: literal-string-template-end - include: scope:text.html.js-template apply_prototype: true literal-string-template-js: - match: (?i:((/\*)\s*js\s*(\*/))|(js))\s*(({{tagged_template_quote_begin}}){{trailing_wspace}}?) captures: 1: comment.block.js 2: punctuation.definition.comment.begin.js 3: punctuation.definition.comment.end.js 4: variable.function.tagged-template.js 5: meta.string.template.js string.quoted.other.js 6: punctuation.definition.string.begin.js set: literal-string-template-js-body literal-string-template-js-body: - meta_include_prototype: false - meta_content_scope: meta.string.template.js source.js.embedded.js - include: literal-string-template-end - include: scope:source.js.js-template apply_prototype: true literal-string-template-json: - match: (?i:((/\*)\s*json\s*(\*/))|(json))\s*(({{tagged_template_quote_begin}}){{trailing_wspace}}?) captures: 1: comment.block.js 2: punctuation.definition.comment.begin.js 3: punctuation.definition.comment.end.js 4: variable.function.tagged-template.js 5: meta.string.template.js string.quoted.other.js 6: punctuation.definition.string.begin.js set: literal-string-template-json-body literal-string-template-json-body: - meta_include_prototype: false - meta_content_scope: meta.string.template.js source.json.embedded.js - include: literal-string-template-end - include: scope:source.json.js-template apply_prototype: true literal-string-template-sql: - match: (?i:((/\*)\s*sql\s*(\*/))|(sql))\s*(({{tagged_template_quote_begin}}){{trailing_wspace}}?) captures: 1: comment.block.js 2: punctuation.definition.comment.begin.js 3: punctuation.definition.comment.end.js 4: variable.function.tagged-template.js 5: meta.string.template.js string.quoted.other.js 6: punctuation.definition.string.begin.js set: literal-string-template-sql-body literal-string-template-sql-body: - meta_include_prototype: false - meta_content_scope: meta.string.template.js source.sql.embedded.js - include: literal-string-template-end - include: scope:source.sql.js-template apply_prototype: true