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

Likely bug in add_multi_line. #1359

Open
1uc opened this issue Jul 19, 2024 · 0 comments
Open

Likely bug in add_multi_line. #1359

1uc opened this issue Jul 19, 2024 · 0 comments

Comments

@1uc
Copy link
Collaborator

1uc commented Jul 19, 2024

It would seem that from the second line onward, under-indented code will be printed incorrectly. For example:

add_mutli_line(R"(
     x;
fooo;kkk
)");

would likely produce:

{indent}x;
{indent}kkk

The likely culprit is:

add_line(line.substr(prefix_length));

because it only considers the first line for guessing the indentation level of the multi-line string.

(I've not 100% confirmed it's bugged.)

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