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
varx=string.IsNullOrEmpty("")?$"empty"// comment after interpolated string:"not empty";
Output:
The second branch of the ternary expression gets moved after the comment on one line.
varx=string.IsNullOrEmpty("")?$"empty"// comment after interpolated string : "not empty";
Expected behavior:
The expression should be kept separated into multiple lines.
The problem only occurs when the first branch is an interpolated string. For a string with no interpolation, it works as expected and the following is kept as given:
varx=string.IsNullOrEmpty("")?"empty"// without interpolation it's fine:"not empty";
The text was updated successfully, but these errors were encountered:
mishioo
changed the title
Incorect formatting of ternary expresion a comment after an interpolated string
Incorect formatting of ternary expresion with a comment after an interpolated string
May 16, 2024
Input:
Output:
The second branch of the ternary expression gets moved after the comment on one line.
Expected behavior:
The expression should be kept separated into multiple lines.
The problem only occurs when the first branch is an interpolated string. For a string with no interpolation, it works as expected and the following is kept as given:
The text was updated successfully, but these errors were encountered: