From 9a18f6b7821326bf1de35b4c2c88ec9356907885 Mon Sep 17 00:00:00 2001 From: Floze <88098863+floze-the-genius@users.noreply.github.com> Date: Sun, 19 Jul 2026 00:18:59 +0400 Subject: [PATCH] Fix GitHub Actions sibling job scopes Pop the job-definition context when indentation returns to the job level so every job identifier is parsed by expect-jobs. Add a syntax assertion for the existing second job. Signed-off-by: Floze <88098863+floze-the-genius@users.noreply.github.com> --- Github Actions.sublime-syntax | 2 +- tests/syntax_test_github_actions.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Github Actions.sublime-syntax b/Github Actions.sublime-syntax index 49fa80d..bb961de 100644 --- a/Github Actions.sublime-syntax +++ b/Github Actions.sublime-syntax @@ -165,7 +165,7 @@ contexts: pop: true job-definition: - - match: ^(?!\1|\s*$) + - match: ^(?!\1[ \t]+|\s*$) pop: true - match: ^\s*(id)\s*(:)\s*([\w\-]+) captures: diff --git a/tests/syntax_test_github_actions.yml b/tests/syntax_test_github_actions.yml index bc0de8a..388112d 100644 --- a/tests/syntax_test_github_actions.yml +++ b/tests/syntax_test_github_actions.yml @@ -280,6 +280,8 @@ jobs: #^^^^^^^^^^^^ source.shell.bash.embedded job_foobar: +# ^^^^^^^^^^ entity.name.function.github-actions +# ^ punctuation.separator.key-value.yaml runs-on: ubuntu-22.04 needs: run_syntax_tests needs: [ run_syntax_tests ]