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

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

Open
cvbge opened this issue Jul 19, 2024 · 0 comments

Comments

@cvbge
Copy link

cvbge commented Jul 19, 2024

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 "\ ".

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

No branches or pull requests

1 participant