nmodl icon indicating copy to clipboard operation
nmodl copied to clipboard

Likely bug in `add_multi_line`.

Open 1uc opened this issue 1 year ago • 0 comments

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: https://github.com/BlueBrain/nmodl/blob/38f90fff816e8124a42f16275fbd1add0fa5181a/src/printer/code_printer.cpp#L86

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.)

1uc avatar Jul 19 '24 10:07 1uc