csharpier
csharpier copied to clipboard
Extra indent when call method on RawStringLiteral
Input:
var fillingProgress = calculator.Calculate(
"""
{
"TextField": "",
"NumberField": "",
"DateRangeField": "",
"TimeField": "",
"RadioGroupField": "",
"DropdownField": "",
"CheckBoxField": "",
"CheckBoxGroupField": "",
"TagInputField": "",
"FileField": "",
"Weight": "",
"Height": ""
}
""".ToJsonObject()!,
[]
);
Output:
var fillingProgress = calculator.Calculate(
"""
{
"TextField": "",
"NumberField": "",
"DateRangeField": "",
"TimeField": "",
"RadioGroupField": "",
"DropdownField": "",
"CheckBoxField": "",
"CheckBoxGroupField": "",
"TagInputField": "",
"FileField": "",
"Weight": "",
"Height": ""
}
""".ToJsonObject()!,
[]
);
Expected behavior:
var fillingProgress = calculator.Calculate(
"""
{
"TextField": "",
"NumberField": "",
"DateRangeField": "",
"TimeField": "",
"RadioGroupField": "",
"DropdownField": "",
"CheckBoxField": "",
"CheckBoxGroupField": "",
"TagInputField": "",
"FileField": "",
"Weight": "",
"Height": ""
}
""".ToJsonObject()!,
[]
);
It gets even worse if you call several methods in chain Input:
var fillingProgress = calculator.Calculate(
"""
{
"TextField": "",
"NumberField": "",
"DateRangeField": "",
"TimeField": "",
"RadioGroupField": "",
"DropdownField": "",
"CheckBoxField": "",
"CheckBoxGroupField": "",
"TagInputField": "",
"FileField": "",
"Weight": "",
"Height": ""
}
""".ToJsonObject()!.Select(x => x),
[]
);
Output:
var fillingProgress = calculator.Calculate("""
{
"TextField": "",
"NumberField": "",
"DateRangeField": "",
"TimeField": "",
"RadioGroupField": "",
"DropdownField": "",
"CheckBoxField": "",
"CheckBoxGroupField": "",
"TagInputField": "",
"FileField": "",
"Weight": "",
"Height": ""
}
""".ToJsonObject()!.Select(x => x), []);
Expected:
var fillingProgress = calculator.Calculate(
"""
{
"TextField": "",
"NumberField": "",
"DateRangeField": "",
"TimeField": "",
"RadioGroupField": "",
"DropdownField": "",
"CheckBoxField": "",
"CheckBoxGroupField": "",
"TagInputField": "",
"FileField": "",
"Weight": "",
"Height": ""
}
""".ToJsonObject()!
.Select(x => x),
[]
);