Skip to content

Interpolated strings with escaped brace before interpolation get highlighted weirdly. #333

@teo-tsirpanis

Description

@teo-tsirpanis

Consider the following example, taken from a test:

class TestClass {
    string test = $"hello {{{one}}} world {{{two}}}!";
}

This is how it highlights:

Image

The {{ escaped brace does not get highlighted as string, and instead gets treated as a block start. This produces more side-effects when highlighting a file with this pattern.

From what I saw, it belongs to textmate scopes string.quoted.double.cs, meta.interpolation.cs, string.quoted.double.cs, source.cs. Maybe VSCode has trouble recognizing the quoted string inside the interpolation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions