do not discard whitespaces

Before this change, this line threw away whitespace chunks such as newlines or spaces. Token boundaries collapsed, so this corrupted both the stream and the rendering: short code blocks disappeared entirely, longer code blocks were truncated and multiple list items shared a single line.
This commit is contained in:
Oliver Kunc 2026-02-13 18:15:42 +01:00 committed by GitHub
parent ea4e3f0199
commit 3202b8b629
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,7 +12,7 @@ public record ResponsesDeltaStreamLine(
#region Implementation of IResponseStreamLine
/// <inheritdoc />
public bool ContainsContent() => !string.IsNullOrWhiteSpace(this.Delta);
public bool ContainsContent() => this.Delta is not null;
/// <inheritdoc />
public ContentStreamChunk GetContent() => new(this.Delta, this.GetSources());
@ -36,4 +36,4 @@ public record ResponsesDeltaStreamLine(
public IList<ISource> GetSources() => [];
#endregion
}
}