Merge pull request #44

* fix: various bug fixes
This commit is contained in:
Dean Sheather
2024-05-12 17:56:53 -07:00
committed by GitHub
parent 23ba24314b
commit dba01de388
2 changed files with 20 additions and 3 deletions
+6 -2
View File
@@ -72,7 +72,9 @@ public class TextChunk : Chunk
internal TextChunk(ChunkSource source, Payload? link, string content) : base(source, link)
{
Content = content;
// This has been null in the past, and it broke rendering code.
// ReSharper disable once NullCoalescingConditionIsAlwaysNotNullAccordingToAPIContract
Content = content ?? "";
}
// ReSharper disable once UnusedMember.Global // Used by MessagePack
@@ -82,7 +84,9 @@ public class TextChunk : Chunk
Foreground = foreground;
Glow = glow;
Italic = italic;
Content = content;
// See above.
// ReSharper disable once NullCoalescingConditionIsAlwaysNotNullAccordingToAPIContract
Content = content ?? "";
}
/// <summary>