From 09916959accdc4a6d629aed24b9a8fd97470593a Mon Sep 17 00:00:00 2001 From: laniakea64 Date: Sat, 25 May 2024 12:10:12 -0400 Subject: [PATCH] Fix precision of shell-expanded string matches --- syntax/just.vim | 8 ++++---- tests/cases/tricky.html | 3 +++ tests/cases/tricky.just | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/syntax/just.vim b/syntax/just.vim index 5bed122..8b004c8 100644 --- a/syntax/just.vim +++ b/syntax/just.vim @@ -34,15 +34,15 @@ syn region justRawString start=/'''/ end=/'''/ syn region justString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=justLineContinuation,justStringEscapeSequence syn region justString start=/"""/ skip=/\\\\\|\\"/ end=/"""/ contains=justLineContinuation,justStringEscapeSequence -syn region justShellExpandRawString start=/x'/ end=/'/ +syn region justShellExpandRawString start=/\v\k@1[dependencies] """)}} > {{quote(cache_directory() / 'Cargo.toml-' + valid_uuid)}} + +not-shell-expanded-string fix: (functions2 fix'$HOME') +not-shell-expanded-string2 _-x: (functions2 _-x"$HOME") diff --git a/tests/cases/tricky.just b/tests/cases/tricky.just index 646d768..301c0e0 100644 --- a/tests/cases/tricky.just +++ b/tests/cases/tricky.just @@ -151,3 +151,6 @@ edition = "2021" [dependencies] """)}} > {{quote(cache_directory() / 'Cargo.toml-' + valid_uuid)}} + +not-shell-expanded-string fix: (functions2 fix'$HOME') +not-shell-expanded-string2 _-x: (functions2 _-x"$HOME")