Skip to content

Commit

Permalink
Merge branch 'sublimehq:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
maximzakharov authored Mar 10, 2024
2 parents cf20cf6 + 989fff8 commit 789bf3c
Show file tree
Hide file tree
Showing 163 changed files with 13,166 additions and 3,619 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
# latest stable build
# https://www.sublimetext.com/download
- sublime-channel: stable
sublime-build: 4143
sublime-build: 4169
optional: true

# latest dev build
Expand Down
4 changes: 2 additions & 2 deletions ASP/Embeddings/CSS (for ASP).sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#
# It powers VBScript highlighting within ASP tags in embedded CSS.
#
# <script>
# <style>
# <%! ... %>
# <%= ... %>
# <% ... %>
# </script>
# </style>
#
# The primary task is to add `asp-tags` context to CSS's
# prototype to match all the <% %> tags.
Expand Down
32 changes: 32 additions & 0 deletions ASP/Embeddings/JSON (for ASP).sublime-syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
%YAML 1.2
---
###############################################################################
# This intermediate syntax is used by `HTML (ASP).sublime-syntax`
#
# It powers VBScript highlighting within ASP tags in embedded CSS.
#
# <script type="application/json">
# <%! ... %>
# <%= ... %>
# <% ... %>
# </script>
#
# The primary task is to add `asp-tags` context to CSS's
# prototype to match all the <% %> tags.
###############################################################################

scope: source.json.embedded.asp
version: 2
hidden: true

extends: Packages/JSON/JSON.sublime-syntax

contexts:

prototype:
- meta_prepend: true
- include: HTML (ASP).sublime-syntax#asp-tags

string-prototype:
- meta_prepend: true
- include: HTML (ASP).sublime-syntax#asp-interpolations
27 changes: 27 additions & 0 deletions ASP/HTML (ASP).sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,33 @@ contexts:
3: source.js.embedded.html
4: comment.block.html punctuation.definition.comment.end.html

script-json-content:
- meta_include_prototype: false
- match: \s*((<!\[)(CDATA)(\[))
captures:
1: meta.tag.sgml.cdata.html
2: punctuation.definition.tag.begin.html
3: keyword.declaration.cdata.html
4: punctuation.definition.tag.begin.html
pop: 1 # make sure to match only once
embed: scope:source.json.embedded.asp
embed_scope: meta.tag.sgml.cdata.html source.json.embedded.html
escape: \]\]>
escape_captures:
0: meta.tag.sgml.cdata.html punctuation.definition.tag.end.html
- match: '{{script_content_begin}}'
captures:
1: comment.block.html punctuation.definition.comment.begin.html
pop: 1 # make sure to match only once
embed: scope:source.json.embedded.asp
embed_scope: source.json.embedded.html
escape: '{{script_content_end}}'
escape_captures:
1: source.json.embedded.html
2: comment.block.html punctuation.definition.comment.end.html
3: source.json.embedded.html
4: comment.block.html punctuation.definition.comment.end.html

script-vbscript:
- meta_scope: meta.tag.script.begin.html
- include: script-common
Expand Down
24 changes: 23 additions & 1 deletion ASP/syntax_test_asp.asp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,28 @@
</script>
' ^^^^^^^ meta.tag - source
<script type="application/ld+json">
{
<% key %>: <%.Site.Color%>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.json.embedded.html
| ^^^^^^^^^ meta.mapping.json meta.interpolation.asp
| ^^ meta.mapping.json - meta.interpolation
| ^^^^^^^^^^^^^^^ meta.mapping.value.json meta.interpolation.asp
| ^ meta.mapping.json - meta.interpolation
"<% key %>": "<%.Site.Color%>",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.json.embedded.html
| ^ meta.mapping.key.json string.quoted.double.json punctuation.definition.string.begin.json
| ^^^^^^^^^ meta.mapping.key.json meta.interpolation.asp - string
| ^ meta.mapping.key.json string.quoted.double.json punctuation.definition.string.end.json
| ^^ meta.mapping.json - meta.interpolation
| ^ meta.mapping.value.json meta.string.json string.quoted.double.json punctuation.definition.string.begin.json
| ^^^^^^^^^^^^^^^ meta.mapping.value.json meta.interpolation.asp - string
| ^ meta.mapping.value.json meta.string.json string.quoted.double.json punctuation.definition.string.end.json
| ^ meta.mapping.json - meta.interpolation
}
</script>

<style>
' <- source.css.embedded.html
Expand Down Expand Up @@ -208,7 +230,7 @@
' ^^^^^^^^ source.asp.embedded.html variable.other.asp
' ^^ punctuation.section.embedded.end.asp
' ^ punctuation.section.block.begin.css
' ^^^^^^^^^ meta.embedded.asp
' ^^^^^^^^^ meta.property-name.css support.type.property-name.css meta.embedded.asp
' ^ punctuation.separator.key-value.css
' ^^^^^^^^^^ meta.property-value.css meta.embedded.asp
' ^ punctuation.terminator.rule.css
Expand Down
2 changes: 1 addition & 1 deletion AppleScript/AppleScript.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ file_extensions:

first_line_match: |-
(?xi:
^ \#! .* \bosascript\b # shebang
^ \#! .* \bosascript(?!\s+-l\s+JavaScript)\b # shebang
| ^ \s* \# .*? -\*- .*? \bosascript\b .*? -\*- # editorconfig
)
Expand Down
2 changes: 1 addition & 1 deletion Batch File/Batch File (Compound).sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ hidden: true
extends: Packages/Batch File/Batch File.sublime-syntax

variables:
command_terminator_chars: '[|&<>)]'
eoc_char: '[\n|&)]'
Loading

0 comments on commit 789bf3c

Please sign in to comment.