fix: dont add empty strings to builder
This commit is contained in:
parent
1e4bcb07b0
commit
9cb981e86d
1 changed files with 4 additions and 1 deletions
|
|
@ -171,7 +171,10 @@ public class Logger : ILogger
|
|||
if (placeholderIndex == 0 && attemptedParsing)
|
||||
placeholderIndex = leftOver.Length;
|
||||
|
||||
builder.Add(new StringPart { String = leftOver[..placeholderIndex] });
|
||||
var str = leftOver[..placeholderIndex];
|
||||
if (!string.IsNullOrEmpty(str))
|
||||
builder.Add(new StringPart { String = str });
|
||||
|
||||
leftOver = leftOver[placeholderIndex..];
|
||||
attemptedParsing = false;
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue