Skip to content

Commit

Permalink
Syntax: Add support for WAST/WIT fenced code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Aug 18, 2024
1 parent 94add27 commit bf23923
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
14 changes: 14 additions & 0 deletions syntaxes/Code Block Syntaxes.sublime-completions
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,20 @@
"details": "Specifies <code>SQL</code> code highlighting"
},

// WASM
{
"trigger": "wast",
"annotation": "WAST",
"kind": ["markup", "s", "Syntax"],
"details": "Specifies <code>WebAssembly Text</code> code highlighting"
},
{
"trigger": "wit",
"annotation": "WIT",
"kind": ["markup", "s", "Syntax"],
"details": "Specifies <code>WabAssembly Interface Type</code> code highlighting"
},

// XML
{
"trigger": "atom",
Expand Down
46 changes: 46 additions & 0 deletions syntaxes/Markdown.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,8 @@ contexts:
- include: fenced-twee
- include: fenced-twig
- include: fenced-verilog
- include: fenced-wast
- include: fenced-wit
- include: fenced-xonsh

fenced-actionscript:
Expand Down Expand Up @@ -2858,6 +2860,50 @@ contexts:
1: punctuation.definition.raw.code-fence.end.markdown
2: meta.fold.code-fence.end.markdown
fenced-wast:
- match: |-
(?x)
{{fenced_code_block_start}}
(?i:\s*(wast))
{{fenced_code_block_trailing_infostring_characters}}
captures:
0: meta.code-fence.definition.begin.wast.markdown-gfm
2: punctuation.definition.raw.code-fence.begin.markdown
5: constant.other.language-name.markdown
6: comment.line.infostring.markdown
7: meta.fold.code-fence.begin.markdown
embed: scope:source.wast
embed_scope:
markup.raw.code-fence.wast.markdown-gfm
source.wast
escape: '{{fenced_code_block_escape}}'
escape_captures:
0: meta.code-fence.definition.end.wast.markdown-gfm
1: punctuation.definition.raw.code-fence.end.markdown
2: meta.fold.code-fence.end.markdown
fenced-wit:
- match: |-
(?x)
{{fenced_code_block_start}}
(?i:\s*(wit))
{{fenced_code_block_trailing_infostring_characters}}
captures:
0: meta.code-fence.definition.begin.wit.markdown-gfm
2: punctuation.definition.raw.code-fence.begin.markdown
5: constant.other.language-name.markdown
6: comment.line.infostring.markdown
7: meta.fold.code-fence.begin.markdown
embed: scope:source.wit
embed_scope:
markup.raw.code-fence.wit.markdown-gfm
source.wit
escape: '{{fenced_code_block_escape}}'
escape_captures:
0: meta.code-fence.definition.end.wit.markdown-gfm
1: punctuation.definition.raw.code-fence.end.markdown
2: meta.fold.code-fence.end.markdown
fenced-xonsh:
- match: |-
(?x)
Expand Down

0 comments on commit bf23923

Please sign in to comment.