Skip to content

Self closing textarea throws unexpected token #425

@ignatiusmb

Description

@ignatiusmb

Describe the bug
Using a self-closing <textarea /> throws unexpected token for code after it, specifically in <style>

To Reproduce
Steps to reproduce the behavior:

  1. Add <textarea></textarea> to a Svelte file
  2. Autoformats to <textarea />

Expected behavior
Expected to work like any other self closing tag.

Screenshots

  • Not working in self-closing tag
    image

  • Works with closing tag but needs to have text content inside to not autoformat it back to a self-closing tag
    image

System (please complete the following information):

  • OS: Windows 10
  • IDE: VSCode
  • Plugin/Package: Svelte for VSCode

Additional context
A temporary workaround is to replace textarea with <div contenteditable />
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions