Skip to content

Wrapped lines (multi-line values) with initial whitespace are incorrectly stored #89

@cvbge

Description

@cvbge

I have "Wrap lines after escaped newline characters" option enabled.

Following value:

void foo() {
  ++x;
}

should be encoded as: (1)

void foo() {\n\
\  ++x;\n\
}

Notice the initial "\ " in second line - it is added to keep the initial whitespace characters in this line.

But the plugin encodes it as

void foo() {\n\
  ++x;\n\
}

which is invalid because it is decoded as

void foo() {
++x;
}

which is wrong - initial indentation in 2nd line is lost.

Same if I open a file with correct encoding (1), then the plugin displays it correctly, but when it saves it back, it removes the initial "\ ".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions