Added an analyzer which keeps line breaks LF on every system (#1193)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-11 19:30:00 +01:00
1 parent b1c1f13993
commit 65d50de033
96 files changed
+741 -393

No files matched your search

+13 -13
View File
@@ -775,7 +775,7 @@ public sealed class ContentText : IContent
{
var sb = new StringBuilder();
var attachmentWebAddresses = new HashSet<string>(StringComparer.Ordinal);
sb.AppendLine(this.Text);
sb.AppendLineLF(this.Text);
if(this.FileAttachments.Count > 0)
{
@@ -856,13 +856,13 @@ public sealed class ContentText : IContent
content = extraction.Content;
}
documentBlocks.AppendLine();
documentBlocks.AppendLine("---------------------------------------");
documentBlocks.AppendLine($"File path: {document.FilePath}");
documentBlocks.AppendLine("File content:");
documentBlocks.AppendLine("````");
documentBlocks.AppendLine(content);
documentBlocks.AppendLine("````");
documentBlocks.AppendLineLF();
documentBlocks.AppendLineLF("---------------------------------------");
documentBlocks.AppendLineLF($"File path: {document.FilePath}");
documentBlocks.AppendLineLF("File content:");
documentBlocks.AppendLineLF("````");
documentBlocks.AppendLineLF(content);
documentBlocks.AppendLineLF("````");
foreach (var address in WebAddresses.Find(content))
if (WebAddresses.TryCreateRequestKey(address, out var requestKey))
@@ -871,17 +871,17 @@ public sealed class ContentText : IContent
if (documentBlocks.Length > 0)
{
sb.AppendLine();
sb.AppendLine("The following files are attached to this message:");
sb.AppendLineLF();
sb.AppendLineLF("The following files are attached to this message:");
sb.Append(documentBlocks);
}
var numImages = normalizedAttachments.Count(x => x is { IsImage: true, Exists: true });
if (numImages > 0)
{
sb.AppendLine();
sb.AppendLine($"Additionally, there are {numImages} image file(s) attached to this message. ");
sb.AppendLine("Please consider them as part of the message content and use them to answer accordingly.");
sb.AppendLineLF();
sb.AppendLineLF($"Additionally, there are {numImages} image file(s) attached to this message. ");
sb.AppendLineLF("Please consider them as part of the message content and use them to answer accordingly.");
}
}