Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant