From 8c3f95d5f784972e2e8823d89cd6e1757f055ed8 Mon Sep 17 00:00:00 2001 From: laniakea64 Date: Sun, 7 Jul 2024 09:58:30 -0400 Subject: [PATCH] Support no space between module name and module path string --- syntax/just.vim | 2 +- tests/cases/mod.html | 5 +++++ tests/cases/mod.just | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/syntax/just.vim b/syntax/just.vim index 80fffa8..ebe27f8 100644 --- a/syntax/just.vim +++ b/syntax/just.vim @@ -297,7 +297,7 @@ syn match justImportStatement '^import' contained syn match justOldInclude "^!include" -syn match justModule /\v^mod%(%(\s|\\\n)*\?)?%(\s|\\\n)+\h\k*\s*%($|%(\s|\\\n)+%(x?['"])@=|%(\s|\\\n)*#@=)/ +syn match justModule /\v^mod%(%(\s|\\\n)*\?)?%(\s|\\\n)+\h\k*\s*%($|%(\s|\\\n)*%(x?['"]|#)@=)/ \ transparent contains=justModStatement,justName,justOptionalFile syn match justModStatement '^mod' contained diff --git a/tests/cases/mod.html b/tests/cases/mod.html index 9a4bbe5..446c319 100644 --- a/tests/cases/mod.html +++ b/tests/cases/mod.html @@ -19,3 +19,8 @@ mod foo#comment mod foo \ # comment + +mod foo"foo.just" + +# not a shell-expanded string +mod? x"$FOO.just" diff --git a/tests/cases/mod.just b/tests/cases/mod.just index 45cfa7f..696f19f 100644 --- a/tests/cases/mod.just +++ b/tests/cases/mod.just @@ -19,3 +19,8 @@ mod foo # comment mod foo#comment mod foo \ # comment + +mod foo"foo.just" + +# not a shell-expanded string +mod? x"$FOO.just"