Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.github/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
syntax_test_* export-ignore
preview.* export-ignore
50 changes: 50 additions & 0 deletions .github/workflows/ci-syntax-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI Syntax Tests

on:
push:
branches:
- master
tags-ignore:
- '**'
paths:
- '.github/workflows/ci-syntax-tests.yml'
- '**.sublime-syntax'
- '**/syntax_test_*'
pull_request:
paths:
- '.github/workflows/ci-syntax-tests.yml'
- '**.sublime-syntax'
- '**/syntax_test_*'
workflow_dispatch:

jobs:
syntax_tests:
name: Sublime Text ${{ matrix.build }}
runs-on: ubuntu-latest
timeout-minutes: 15 # default is 6 hours!
strategy:
matrix:
include:
# Stable ST4 builds
- build: 4152
default_packages: binary
- build: 4169
default_packages: binary
- build: 4180
default_packages: binary
- build: 4192
default_packages: binary
# Latest dev build (and latest available maybe unreleased syntaxes)
- build: latest
default_packages: master
steps:
- name: Checkout EJS
uses: actions/checkout@v4
with:
path: EJS
- uses: SublimeText/syntax-test-action@v2
with:
build: ${{ matrix.build }}
package_name: EJS
package_root: EJS
default_packages: ${{ matrix.default_packages }}
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# MacOS specific ignores
.DS_Store

# development
.sublime/
.venv/
.vscode/

# python cache files
__pycache__/
*.pyc
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8
91 changes: 8 additions & 83 deletions Default.sublime-keymap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// <% %>
{ "keys": ["%"], "command": "insert_snippet", "args": {"contents": "%${0: }%>"}, "context":
[
{ "key": "selector", "operand": "text.ejs.percentsign - source.js", "match_all": true },
{ "key": "selector", "operand": "text.html.ejs - text.html.ejs source.js", "match_all": true },
{ "key": "setting.auto_match_enabled", "operand": true },
{ "key": "selection_empty", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<$", "match_all": true },
Expand All @@ -13,108 +13,33 @@
// <? ?>
{ "keys": ["?"], "command": "insert_snippet", "args": {"contents": "?${0: }?>"}, "context":
[
{ "key": "selector", "operand": "text.ejs.questionmark - source.js", "match_all": true },
{ "key": "selector", "operand": "text.html.ejs.questionmark - text.html.ejs source.js", "match_all": true },
{ "key": "setting.auto_match_enabled", "operand": true },
{ "key": "selection_empty", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<$", "match_all": true },
{ "key": "following_text", "operator": "not_regex_contains", "operand": "^[?=_#>-]", "match_all": true }
]
},
// <$ $>
{ "keys": ["$"], "command": "insert_snippet", "args": {"contents": "\\$${0: }\\$>"}, "context":
[
{ "key": "selector", "operand": "text.ejs.dollarsign - source.js", "match_all": true },
{ "key": "setting.auto_match_enabled", "operand": true },
{ "key": "selection_empty", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<$", "match_all": true },
{ "key": "following_text", "operator": "not_regex_contains", "operand": "^[$=_#>-]", "match_all": true }
]
},
// <@ @>
{ "keys": ["@"], "command": "insert_snippet", "args": {"contents": "@${0: }@>"}, "context":
[
{ "key": "selector", "operand": "text.ejs.atsign - source.js", "match_all": true },
{ "key": "setting.auto_match_enabled", "operand": true },
{ "key": "selection_empty", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<$", "match_all": true },
{ "key": "following_text", "operator": "not_regex_contains", "operand": "^[@=_#>-]", "match_all": true }
{ "key": "following_text", "operator": "not_regex_contains", "operand": "^[%=_#>-]", "match_all": true }
]
},

// Auto-indent
// <% %>
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
[
{ "key": "selector", "operand": "text.ejs.percentsign - source.js", "match_all": true },
{ "key": "selector", "operand": "text.html.ejs", "match_all": true },
{ "key": "setting.auto_indent", "operand": true },
{ "key": "selection_empty", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<%(?!%)[=_#-]?\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^[_-]?%>", "match_all": true }
]
},
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
[
{ "key": "selector", "operand": "text.ejs.percentsign punctuation.definition.js.end.ejs", "match_all": true },
{ "key": "setting.auto_indent", "operand": true },
{ "key": "selection_empty", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<%(?!%)[=_#-]?\\s*$", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<%[#=_-]?\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\s*[_-]?%>", "match_all": true }
]
},
// <? ?>
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
[
{ "key": "selector", "operand": "text.ejs.questionmark - source.js", "match_all": true },
{ "key": "selector", "operand": "text.html.ejs.questionmark", "match_all": true },
{ "key": "setting.auto_indent", "operand": true },
{ "key": "selection_empty", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<\\?(?!\\?)[=_#-]?\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^[_-]?\\?>", "match_all": true }
]
},
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
[
{ "key": "selector", "operand": "text.ejs.questionmark punctuation.definition.js.end.ejs", "match_all": true },
{ "key": "setting.auto_indent", "operand": true },
{ "key": "selection_empty", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<\\?(?!\\?)[=_#-]?\\s*$", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<\\?[#=_-]?\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\s*[_-]?\\?>", "match_all": true }
]
},
// <$ $>
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
[
{ "key": "selector", "operand": "text.ejs.dollarsign - source.js", "match_all": true },
{ "key": "setting.auto_indent", "operand": true },
{ "key": "selection_empty", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<\\$(?!\\$)[=_#-]?\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^[_-]?\\$>", "match_all": true }
]
},
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
[
{ "key": "selector", "operand": "text.ejs.dollarsign punctuation.definition.js.end.ejs", "match_all": true },
{ "key": "setting.auto_indent", "operand": true },
{ "key": "selection_empty", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<\\$(?!\\$)[=_#-]?\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\s*[_-]?\\$>", "match_all": true }
]
},
// <@ @>
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
[
{ "key": "selector", "operand": "text.ejs.atsign - source.js", "match_all": true },
{ "key": "setting.auto_indent", "operand": true },
{ "key": "selection_empty", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<@(?!@)[=_#-]?\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^[_-]?@>", "match_all": true }
]
},
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n\t$0\n"}, "context":
[
{ "key": "selector", "operand": "text.ejs.atsign punctuation.definition.js.end.ejs", "match_all": true },
{ "key": "setting.auto_indent", "operand": true },
{ "key": "selection_empty", "operand": false, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<@(?!@)[=_#-]?\\s*$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^\\s*[_-]?@>", "match_all": true }
]
}
]
Loading