Skip to content

Add shared test cases with vim-svelte-plugin, fix indent after empty tag - #50

Merged
leafOfTree merged 2 commits into
masterfrom
shared-tests
Oct 21, 2026
Merged

leafOfTree merged 2 commits into
masterfrom
shared-tests

Conversation

@leafOfTree

Copy link
Copy Markdown
Owner
  • Fix: a line like <input @input="(e) => update(e)" /> was taken as an empty tag without />, as > in => matched its end, so the next line was indented one level less. Test: shared-empty-tag.

  • Name cases for scenarios also in vim-svelte-plugin as shared-*: empty-tag, initial-indent, lang-attr, multiline-tag, no-syntax-file, shiftwidth-zero, syntax-merge, undo.

  • test/shared.sh clones vim-svelte-plugin and lists shared cases in only one of them, as a warning in a separate shared job on GitHub Actions. It doesn't fail, as the other plugin may be updated later.

  • Renamed: lang-attr, shiftwidth-zero, no-syntax-indent-file, syntax-merge, undo, initial-indent. New: shared-empty-tag, shared-multiline-tag.

A line like <input @input="(e) => update(e)" /> was taken as an empty
tag without '/>', as '>' in '=>' matched its end, so the next line was
indented one level less. Skip '>' in quotes, and don't take '/>' as the
end of an empty tag.
Name cases for scenarios also in vim-svelte-plugin as shared-*, adding
one for multiline tags. test/shared.sh lists shared cases in only one
of the plugins, as a warning in a separate job on GitHub Actions.
@leafOfTree
leafOfTree merged commit b8bcfbd into master Oct 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant