qsharp-compiler
qsharp-compiler copied to clipboard
Incorrect syntax highlight for interpolated strings
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):

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)