You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: if/else processor directive messes up indentation #1853
I would really like the .ReadAsStringAsync() calls to line up. This seems related to #664 although this specific edge-case seems a lot easier to solve, since we know the #if and #else can't be active at the same time.
Steps to Reproduce
Format this code with csharpier:
{varlongvariablename=awaitthingy.Content
#if NET
.doTheNetThing(wouldyoustilllovemeifiwasaworm)
#else
.doTheNotNetThing()
#endif
.Finish();}
Actual Behavior
{varlongvariablename=awaitthingy.Content
#if NET
.doTheNetThing(wouldyoustilllovemeifiwasaworm)
#else
.doTheNotNetThing()
#endif
.Finish();}
Expected Behavior
{varlongvariablename=awaitthingy.Content
#if NET
.doTheNetThing(wouldyoustilllovemeifiwasaworm)
#else
.doTheNotNetThing()
#endif
.Finish();}
I'm guessing that the changes from #1676 may take care of this. Based on which branch of the #if is active the invocation chain formats differently. #1676 may get those two branches consistent.
This issue is stale because it has been open 90 days with no activity and was not assigned a label or milestone. Leave a comment if this still needs to be addressed or this will be closed in 7 days.
Activity
belav commentedon Apr 23, 2026
I'm guessing that the changes from #1676 may take care of this. Based on which branch of the
#ifis active the invocation chain formats differently. #1676 may get those two branches consistent.github-actions commentedon Jul 23, 2026
This issue is stale because it has been open 90 days with no activity and was not assigned a label or milestone. Leave a comment if this still needs to be addressed or this will be closed in 7 days.