Closed RReverser closed 3 months ago
@belav Looking at changes in #977, it seems that the issue is that it never accounted for interpolated raw strings to begin with?
Yeah looks like it's not just nested raw literals; no formatting whatsoever currently happens inside interpolated raw strings. An even simpler example:
var extensions =
$$"""
{{
foo
.bar
.baz(
)
}}
""";
Ah and now that I figured it's a general issue, I can see it's a duplicate of #1136, so closing.
Input:
Minimal repro:
Output:
Expected behavior:
I saw that raw string literal formatting was implemented in https://github.com/belav/csharpier/issues/975 / https://github.com/belav/csharpier/pull/977, but for some reason it breaks when there are nested raw literals like in the example above (those are fairly common in complex codebase).
I'd expect those strings to be reindented just like they're when no nesting occurs, probably to something like this: