Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Incorrect syntax highlight for interpolated strings #1188

Open
@tcNickolas

Description

@tcNickolas

Describe the bug

Expressions in squiggly brackets inside interpolated strings are highlighted as a string, rather than as Q# code fragments.

To Reproduce

For example, the string

$"Vertex = {vertex} judged{(not expectedResult[vertex]) ? "" | " not"} weakly colored for coloring = {coloring}, edges = {edges}"

is highlighted as follows (on GitHub as well):
image

Expected behavior

I expect the highlighting to be similar to C# interpolated strings, which highlight the squiggly brackets and the expressions inside them as code snippets; so the first not highlighted in blue (keyword), the second one in red (string), and the variables and the ternary operator in black (regular code).

System information

  • Visual Studio Community 2019, 16.11.3 + QDK 0.18.2109.162713, and
  • VS Code, + QDK 0.19.2109.165653
    (From filing this issue it looks like the same problem happens for GitHub syntax highlight)

Metadata

Metadata

Labels

area: editorExtensions for Visual Studio and Visual Studio CodebugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions