From 72ce0059427c77cce7b94968c9dd25e7890c6513 Mon Sep 17 00:00:00 2001 From: laniakea64 Date: Fri, 14 Jun 2024 12:05:20 -0400 Subject: [PATCH] Support `[attribute: value]` syntax --- syntax/just.vim | 6 +++++- tests/cases/recipes-with-extras.html | 19 +++++++++++++++++++ tests/cases/recipes-with-extras.just | 19 +++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/syntax/just.vim b/syntax/just.vim index a4dfe1c..e0ae9a4 100644 --- a/syntax/just.vim +++ b/syntax/just.vim @@ -82,12 +82,15 @@ syn match justRecipeColon ":" contained syn region justRecipeAttributes \ matchgroup=justRecipeAttr start='\v^%(\\\n)@3[positional-arguments] positional *args: echo "$@" + +[group: 'foo group'] +attr-colon1: + echo foo + +[group : \ + \ + "foo group" +] +attr-colon2: + echo foo + +[ + doc: + "Documentation", + + group:'foo group' ] +attr-colon3: + echo foo diff --git a/tests/cases/recipes-with-extras.just b/tests/cases/recipes-with-extras.just index d298764..af5d3b4 100644 --- a/tests/cases/recipes-with-extras.just +++ b/tests/cases/recipes-with-extras.just @@ -133,3 +133,22 @@ long_doc: [positional-arguments] positional *args: echo "$@" + +[group: 'foo group'] +attr-colon1: + echo foo + +[group : \ + \ + "foo group" +] +attr-colon2: + echo foo + +[ + doc: + "Documentation", + + group:'foo group' ] +attr-colon3: + echo foo