Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust syntax for rewritten ShellScript #26

Merged
merged 1 commit into from
Aug 8, 2024
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 Bash (AzureDevops).sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ contexts:
string-prototype:
- meta_prepend: true
- include: scope:source.yaml.pipeline.azure-devops#string-interpolations

variables:
deathaxe marked this conversation as resolved.
Show resolved Hide resolved
# lazy escaping from heredoc as shell maybe indented
no_indent: ^\s*
tab_indent: ^\s*
8 changes: 8 additions & 0 deletions Bash (Github Actions).sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ contexts:
- include: scope:source.yaml.pipeline.github-actions#string-interpolations

heredocs-body:
# before Packages PR #4024
- meta_prepend: true
- match: ^\s*\3$ # the third capture from redirections-here-document
scope: meta.tag.heredoc.shell entity.name.tag.heredoc.shell
pop: 1

heredocs-body-no-expansion:
# before Packages PR #4024
- meta_prepend: true
- match: ^\s*\5$ # the fourth capture from redirections-here-document
scope: meta.tag.heredoc.shell entity.name.tag.heredoc.shell
pop: 1

variables:
# requires Packages PR #4024
# lazy escaping from heredoc as shell maybe indented
no_indent: ^\s*
tab_indent: ^\s*
12 changes: 11 additions & 1 deletion tests/syntax_test_github_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,17 @@ jobs:
- name: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files
run: |
echo '# Some Markdown Content Here' >> $GITHUB_STEP_SUMMARY
# ^^^^^^^^^^^^^^^^^^^^ variable.language.github-actions
# ^^^^^^^^^^^^^^^^^^^^ variable.language.github-actions
echo <<EOF
# ${tilte}
# <- meta.string.heredoc.shell string.unquoted.heredoc.shell
# ^^^^^^^^ meta.string.heredoc.shell meta.interpolation.parameter.shell

$GITHUB_STEP_SUMMARY
# <- meta.string.heredoc.shell variable.language.github-actions punctuation.definition.variable.github-actions
#^^^^^^^^^^^^^^^^^^^ meta.string.heredoc.shell variable.language.github-actions
EOF
# <- meta.tag.heredoc.end.shell entity.name.tag.heredoc.shell

- name: folded shell script command
run: >-
Expand Down
Loading