Skip to content

Syntax highlighting breaks when opening bracket of a method is placed in a new line #63

Open
@DustinCampbell

Description

@DustinCampbell

From @zeroskyx on May 17, 2017 18:46

The following code placed in a class breaks syntax highlighting:

public void Routine
(
  IInterface Interface0,
  IInterface Interface1,
  IInterface Interface2
)
{
  string One = "";
  string Two = "";
  string Three = "";
}

interface IInterface
{
}

Beginning with the second instance of IInterface and after the method body, everything is white -- in more complex projects, somewhere it works again later in the file.
Screenshot:
capture

Removing the newline after public void Routine does not cause the issue:
capture1

I am aware that this appears to be a "strange" coding style; it makes reading constructors with loads of dependency injections much cleaner though (issue happens with both methods and constructors).

Copied from original issue: dotnet/vscode-csharp#1489

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions