From c11e414956e748255ee56cba9a8a10ae68dff728 Mon Sep 17 00:00:00 2001 From: laniakea64 Date: Wed, 16 Oct 2024 23:50:06 -0400 Subject: [PATCH] Tighten match of comment preceding recipe body --- syntax/just.vim | 2 +- tests/cases/invalid.html | 5 +++++ tests/cases/invalid.just | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/syntax/just.vim b/syntax/just.vim index d84da21..4fe9e58 100644 --- a/syntax/just.vim +++ b/syntax/just.vim @@ -24,7 +24,7 @@ syn match justShebang "^\s*#!.*$" contains=justInterpolation,@justOtherCurlyBrac syn match justName "\h\k*" contained syn match justFunction "\h\k*" contained -syn match justPreBodyComment "\v%(\s|\\\n)*#%([^!].*)?\n%(\t+| +)@=" transparent contained contains=justComment +syn match justPreBodyComment "\v%(\s|\\\n)*%([^\\]\n)@3[script: 'bash', "-x", '-c'] attr-shorthand-takes-only-one-argument: + + +recipe-without-body: +# comment + echo this line is not recipe body diff --git a/tests/cases/invalid.just b/tests/cases/invalid.just index 4966810..e6bb2a1 100644 --- a/tests/cases/invalid.just +++ b/tests/cases/invalid.just @@ -122,3 +122,8 @@ comma-is-not-invalid-attr-value: [script: 'bash', "-x", '-c'] attr-shorthand-takes-only-one-argument: + + +recipe-without-body: +# comment + echo this line is not recipe body