Skip to content

Syntax highlighting breaks in multi-line attributes #478

@brunnerh

Description

@brunnerh

Describe the bug
If an attribute value contains multiple lines and the first line has no interpolation, the syntax highlighting of interpolations in later lines will not be applied.

To Reproduce

Example component:

<script>
	export let question = 'Really';
	export let flag = true;
</script>

<!-- Second line highlighted. -->
<div title="{question}?
	{flag ? 'Yes' : 'No'}"/>

<!-- Second line not highlighted. -->
<div title="Really?
	{flag ? 'Yes' : 'No'}"/>

(The same seems to be true for the highlighting on GitHub.)

Expected behavior
Syntax highlighting on all interpolations.

Screenshots

image

System (please complete the following information):

  • OS: Windows 10, 64bit
  • IDE: VSCode 1.48.1
  • Plugin/Package: Svelte for VSCode (v101.10.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions