mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-13 02:38:27 -04:00
Updated editorconfig to (mostly?) require braces around if/else statements, and applied the new formatting rules
This commit is contained in:
@@ -14,7 +14,10 @@ public abstract record SmartText
|
||||
public static SmartText operator +(SmartText text, string input)
|
||||
=> text switch
|
||||
{
|
||||
SmartEmbedText set => set with { PlainText = set.PlainText + input },
|
||||
SmartEmbedText set => set with
|
||||
{
|
||||
PlainText = set.PlainText + input
|
||||
},
|
||||
SmartPlainText spt => new SmartPlainText(spt.Text + input),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(text))
|
||||
};
|
||||
@@ -22,7 +25,10 @@ public abstract record SmartText
|
||||
public static SmartText operator +(string input, SmartText text)
|
||||
=> text switch
|
||||
{
|
||||
SmartEmbedText set => set with { PlainText = input + set.PlainText },
|
||||
SmartEmbedText set => set with
|
||||
{
|
||||
PlainText = input + set.PlainText
|
||||
},
|
||||
SmartPlainText spt => new SmartPlainText(input + spt.Text),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(text))
|
||||
};
|
||||
@@ -41,7 +47,7 @@ public abstract record SmartText
|
||||
|
||||
smartEmbedText.NormalizeFields();
|
||||
|
||||
if (!smartEmbedText.IsValid)
|
||||
if (!smartEmbedText.IsValid)
|
||||
return new SmartPlainText(input);
|
||||
|
||||
return smartEmbedText;
|
||||
|
Reference in New Issue
Block a user