Skip to content

Attributes for <style> on multiple lines causes it to break #1685

@aradalvand

Description

@aradalvand

Describe the bug

After this PR was merged for prettier-plugin-svelte, now by using the singleAttributePerLine: true option for Prettier, formatting a Svelte file that has <style lang="scss" global> spreads the attributes across multiple lines, like so:

<style
    lang="scss"
    global
>
...
</style>

This, however, seems to break Svelte's syntax highlighting, for some reason, it doesn't recognize the contents of the <style> tag as SCSS anymore:

Before:

image

After:
image

Reproduction

Explained above.

Expected behaviour

It should obviously work.

System Info

  • OS: Windows 10
  • IDE: VS Code

Which package is the issue about?

svelte-language-server

Additional Information, eg. Screenshots

No response

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