From 907ff68a6f51e220e1544e29d801b570ea6dcab5 Mon Sep 17 00:00:00 2001 From: laniakea64 Date: Mon, 5 Aug 2024 21:12:49 -0400 Subject: [PATCH] Fix highlighting of `export` assignments with line continuations --- syntax/just.vim | 2 +- tests/cases/line-continuations.html | 5 +++++ tests/cases/line-continuations.just | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/syntax/just.vim b/syntax/just.vim index c104d8c..c0d5f04 100644 --- a/syntax/just.vim +++ b/syntax/just.vim @@ -188,7 +188,7 @@ syn match justAliasDecl "\v^alias%(\s|\\\n)+\h\k*%(\s|\\\n)*:\=%(\s|\\\n)*" \ nextgroup=justAliasRes syn match justAliasRes '\v\h\k*%(\s|\\\n)*%(#@=|$)' contained transparent contains=justFunction -syn match justExportedAssignment "\v^export%(\s|\\\n)+\h\k*\s*:\=" transparent +syn match justExportedAssignment "\v^export%(\s|\\\n)+\h\k*%(\s|\\\n)*:\=" transparent \ contains=justExport,justAssignmentOperator syn match justExport '\v^export' contained diff --git a/tests/cases/line-continuations.html b/tests/cases/line-continuations.html index a15796b..a128aaf 100644 --- a/tests/cases/line-continuations.html +++ b/tests/cases/line-continuations.html @@ -49,6 +49,11 @@ \ ) +export \ + FOO_ENV \ + := \ + "FOO" + test: a \ b echo '123' diff --git a/tests/cases/line-continuations.just b/tests/cases/line-continuations.just index bc4102d..80eb007 100644 --- a/tests/cases/line-continuations.just +++ b/tests/cases/line-continuations.just @@ -49,6 +49,11 @@ f3 := replace_regex \ \ ) +export \ + FOO_ENV \ + := \ + "FOO" + test: a \ b echo '123'