Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighter broken on line with class inside string #746

Closed
swhaworth opened this issue Sep 5, 2016 · 1 comment
Closed

Syntax highlighter broken on line with class inside string #746

swhaworth opened this issue Sep 5, 2016 · 1 comment

Comments

@swhaworth
Copy link

Environment data

dotnet --info output:
.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5

Runtime Environment:
OS Name: debian
OS Version: 8
OS Platform: Linux
RID: debian.8-x64

VS Code version: 1.4.0
C# Extension version: 1.4.1

Steps to reproduce

Create a new CS file, paste in the following content:

namespace X
{
    class Y
    {
        public MethodZ()
        {
            this.Writer.WriteLine("class CInput{0}Register : public {1}", index, baseClass);
        }
    }
}

Expected behavior

Syntax highlighting will set the string content as a single colour and after the string the highlighting will have correct colours for the variable names, etc.

Actual behavior

The string content is using standard C# highlighting for class etc and goes back to the inside string highlighting after the second quote.

This used to work fine prior to C# extension version 1.4.0.

@DustinCampbell
Copy link
Member

This will look much better in the next release:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants