Skip to content

Commit

Permalink
Support no space between module name and module path string
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 committed Jul 7, 2024
1 parent 49d8d86 commit 8c3f95d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion syntax/just.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions tests/cases/mod.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@
<span class="Keyword">mod</span> <span class="Identifier">foo</span><span class="Comment">#comment</span>
<span class="Keyword">mod</span> <span class="Identifier">foo</span> <span class="Special">\</span>
<span class="Comment"># comment</span>

<span class="Keyword">mod</span> <span class="Identifier">foo</span><span class="String">"foo.just"</span>

<span class="Comment"># not a shell-expanded string</span>
<span class="Keyword">mod</span><span class="Conditional">?</span> <span class="Identifier">x</span><span class="String">"$FOO.just"</span>
5 changes: 5 additions & 0 deletions tests/cases/mod.just
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 8c3f95d

Please sign in to comment.