-
-
Notifications
You must be signed in to change notification settings - Fork 139
Closed
Milestone
Description
Environments:
- CSharpier Version: 0.27.0
- Running CSharpier via: dotnet cli
- Operating System: Windows 11
- .csharpierrc Settings: No
- .editorconfig Settings: No
Steps to reproduce:
Try to format the following code:
var expectedTypeProp = "otherTestComponent";
var expectedLabel = StableRandom.Shared.GetString();
var expectedText = StableRandom.Shared.GetString();
var expectedDisplayName = StableRandom.Shared.GetString();
var node = JsonSerializer.Deserialize<SerializedNode>(
$$"""
{
"props": {
"type": "{{expectedTypeProp}}",
"label": "{{expectedLabel}}",
"text": "{{expectedText}}"
},
"hidden": false,
"nodes": [],
"linkedNodes": {},
"displayName": "{{expectedDisplayName}}",
"type": {
"resolvedName": "testComponent"
}
}
""",
_options
);Expected behavior:
No error is outputed
Actual behavior:
CSharpier formats the code and outputs an error:
Failed syntax tree validation.
----------------------------- Original: Around Line 20 -----------------------------
"resolvedName": "testComponent"
}
}
""",
_options
);
----------------------------- Formatted: Around Line 20 -----------------------------
"resolvedName": "testComponent"
}
}
""",
_options
);
Pentadome and Methuselah96
Metadata
Metadata
Assignees
Labels
No labels