diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 70435b8..3ae4efc 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -26,3 +26,11 @@ jobs:
run: ./test/run.sh
env:
VUE_TEST_EDITORS: ${{ matrix.neovim && 'nvim' || 'vim' }}
+
+ shared:
+ name: shared cases with vim-svelte-plugin
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Check shared cases
+ run: ./test/shared.sh
diff --git a/.gitignore b/.gitignore
index 7c02170..d73609c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ test.vue
.DS_STORE
test/deps/
doc/tags
+test/other/
diff --git a/README.md b/README.md
index 4a77d49..336578e 100644
--- a/README.md
+++ b/README.md
@@ -233,6 +233,8 @@ Each case is a `.vue` or `.wpy` file in [test/cases](test/cases), with an option
Tests also run on GitHub Actions for each push and pull request, with Vim 8.2.0000, the latest Vim, Neovim 0.9.5 and the latest Neovim.
+Cases named `shared-*` are for scenarios also in [vim-svelte-plugin][9], which handles blocks in the same way. `./test/shared.sh` lists shared cases in only one of them, as a warning on GitHub Actions, so a fix in one plugin can be checked in the other.
+
## Acknowledgments & Refs
- [mxw/vim-jsx][1]
diff --git a/indent/vue.vim b/indent/vue.vim
index f66bd3d..32a60ac 100644
--- a/indent/vue.vim
+++ b/indent/vue.vim
@@ -19,7 +19,10 @@ function! s:Init()
" To adjust HTML
let s:empty_tagname = '(area|base|br|col|embed|hr|input|img|'
\.'keygen|link|meta|param|source|track|wbr)'
- let s:empty_tag = '\v\<'.s:empty_tagname.'.*(/)@'
+ " Empty tag ending with '>' but not '/>'. '>' in quotes like
+ " @input="(e) => update(e)" doesn't end the tag
+ let s:empty_tag = '\v\<'.s:empty_tagname
+ \ .'>("[^"]*"|''[^'']*''|[^\>"''/]|/(\>)@!)*\>'
let s:empty_tag_start = '\v\<'.s:empty_tagname.'[^>]*$'
let s:empty_tag_end = '\v^\s*[^<>/]*\/?\>\s*'
let s:tag_start = '\v^\s*\<\w*' " <
diff --git a/test/cases/shared-empty-tag.vim b/test/cases/shared-empty-tag.vim
new file mode 100644
index 0000000..b378874
--- /dev/null
+++ b/test/cases/shared-empty-tag.vim
@@ -0,0 +1,7 @@
+" Empty tags like with or without '/>', and '>' in attribute
+" expressions
+let g:test_flatten = 1
+
+function! Check()
+ call ExpectIndentEachLine()
+endfunction
diff --git a/test/cases/shared-empty-tag.vue b/test/cases/shared-empty-tag.vue
new file mode 100644
index 0000000..2c7108c
--- /dev/null
+++ b/test/cases/shared-empty-tag.vue
@@ -0,0 +1,12 @@
+
+
+ update(e)" />
+
x
+
+
y
+
+
z
+
+
w
+
+
diff --git a/test/cases/initial-indent.vim b/test/cases/shared-initial-indent.vim
similarity index 100%
rename from test/cases/initial-indent.vim
rename to test/cases/shared-initial-indent.vim
diff --git a/test/cases/initial-indent.vue b/test/cases/shared-initial-indent.vue
similarity index 100%
rename from test/cases/initial-indent.vue
rename to test/cases/shared-initial-indent.vue
diff --git a/test/cases/lang-attr.vim b/test/cases/shared-lang-attr.vim
similarity index 100%
rename from test/cases/lang-attr.vim
rename to test/cases/shared-lang-attr.vim
diff --git a/test/cases/lang-attr.vue b/test/cases/shared-lang-attr.vue
similarity index 100%
rename from test/cases/lang-attr.vue
rename to test/cases/shared-lang-attr.vue
diff --git a/test/cases/shared-multiline-tag.vim b/test/cases/shared-multiline-tag.vim
new file mode 100644
index 0000000..cb9d78d
--- /dev/null
+++ b/test/cases/shared-multiline-tag.vim
@@ -0,0 +1,6 @@
+" Lines after a multiline start tag or empty tag ending with '>' or '/>'
+let g:test_flatten = 1
+
+function! Check()
+ call ExpectIndentEachLine()
+endfunction
diff --git a/test/cases/shared-multiline-tag.vue b/test/cases/shared-multiline-tag.vue
new file mode 100644
index 0000000..b519135
--- /dev/null
+++ b/test/cases/shared-multiline-tag.vue
@@ -0,0 +1,20 @@
+
+
+ text
+
+
+
+
end
+
+
diff --git a/test/cases/no-syntax-indent-file.vim b/test/cases/shared-no-syntax-file.vim
similarity index 100%
rename from test/cases/no-syntax-indent-file.vim
rename to test/cases/shared-no-syntax-file.vim
diff --git a/test/cases/no-syntax-indent-file.vue b/test/cases/shared-no-syntax-file.vue
similarity index 100%
rename from test/cases/no-syntax-indent-file.vue
rename to test/cases/shared-no-syntax-file.vue
diff --git a/test/cases/shiftwidth-zero.vim b/test/cases/shared-shiftwidth-zero.vim
similarity index 100%
rename from test/cases/shiftwidth-zero.vim
rename to test/cases/shared-shiftwidth-zero.vim
diff --git a/test/cases/shiftwidth-zero.vue b/test/cases/shared-shiftwidth-zero.vue
similarity index 100%
rename from test/cases/shiftwidth-zero.vue
rename to test/cases/shared-shiftwidth-zero.vue
diff --git a/test/cases/syntax-merge.vim b/test/cases/shared-syntax-merge.vim
similarity index 100%
rename from test/cases/syntax-merge.vim
rename to test/cases/shared-syntax-merge.vim
diff --git a/test/cases/syntax-merge.vue b/test/cases/shared-syntax-merge.vue
similarity index 100%
rename from test/cases/syntax-merge.vue
rename to test/cases/shared-syntax-merge.vue
diff --git a/test/cases/undo.vim b/test/cases/shared-undo.vim
similarity index 100%
rename from test/cases/undo.vim
rename to test/cases/shared-undo.vim
diff --git a/test/cases/undo.vue b/test/cases/shared-undo.vue
similarity index 100%
rename from test/cases/undo.vue
rename to test/cases/shared-undo.vue
diff --git a/test/shared.sh b/test/shared.sh
new file mode 100755
index 0000000..290c42a
--- /dev/null
+++ b/test/shared.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+# List shared-* test cases missing in either vim-svelte-plugin or
+# vim-vue-plugin. Both plugins work in the same way for blocks, so a case for
+# a scenario in one plugin should be in the other with the same name. Only
+# warn, as the other plugin may be updated later
+# ./test/shared.sh
+cd "$(dirname "$0")/.." || exit 1
+other=vim-svelte-plugin
+
+dir=test/other/$other
+rm -rf "$dir"
+git clone -q --depth 1 "https://github.com/leafOfTree/$other" "$dir" || exit 0
+
+list() {
+ ls "$1"/test/cases/shared-*.vim 2>/dev/null | sed 's#.*/##; s#\.vim$##' | sort
+}
+list . > test/other/mine
+list "$dir" > test/other/theirs
+
+missing=0
+for name in $(comm -23 test/other/mine test/other/theirs); do
+ echo "::warning::$name is not in $other"
+ missing=1
+done
+for name in $(comm -13 test/other/mine test/other/theirs); do
+ echo "::warning::$name in $other is not here"
+ missing=1
+done
+[ $missing -eq 0 ] && echo "Shared cases are the same as $other"
+exit 0