From 7034d56b688fcb6f794ec251fde5bb5b54c34d20 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Tue, 6 Aug 2024 17:34:08 +0200 Subject: [PATCH] Adjust syntax for rewritten ShellScript --- Bash (AzureDevops).sublime-syntax | 5 +++++ Bash (Github Actions).sublime-syntax | 8 ++++++++ tests/syntax_test_github_actions.yml | 12 +++++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Bash (AzureDevops).sublime-syntax b/Bash (AzureDevops).sublime-syntax index 79a0c26..1d256b2 100644 --- a/Bash (AzureDevops).sublime-syntax +++ b/Bash (AzureDevops).sublime-syntax @@ -16,3 +16,8 @@ contexts: string-prototype: - meta_prepend: true - include: scope:source.yaml.pipeline.azure-devops#string-interpolations + +variables: + # lazy escaping from heredoc as shell maybe indented + no_indent: ^\s* + tab_indent: ^\s* diff --git a/Bash (Github Actions).sublime-syntax b/Bash (Github Actions).sublime-syntax index f1ce62e..7f0f158 100644 --- a/Bash (Github Actions).sublime-syntax +++ b/Bash (Github Actions).sublime-syntax @@ -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* diff --git a/tests/syntax_test_github_actions.yml b/tests/syntax_test_github_actions.yml index 8dd81b2..4a3b53b 100644 --- a/tests/syntax_test_github_actions.yml +++ b/tests/syntax_test_github_actions.yml @@ -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 <-