Skip to content

[Bug]: csharpier-ignore comment removes linespaces before block #1867

@OleRoss

Description

@OleRoss

Description

When I use // csharpier-ignore, the newline before the ignore comment is always removed. I would expect it to follow the same rules applied when the comment is not there.

Steps to Reproduce

void X(){
    int i = 1;


    int x=1;


    // csharpier-ignore
    int y=1;
}

Expected Behavior

The new line should be preserved:

void X()
{
    int i = 1;

    int x = 1;

    // csharpier-ignore
    int y=1;
}

Actual Behavior

The new line is removed:

void X()
{
    int i = 1;

    int x = 1;
    // csharpier-ignore
    int y=1;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions