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

+6 -4
View File
@@ -1,5 +1,7 @@
using System.Text;
using SharedTools.Text;
namespace SharedTools;
public static class LuaTable
@@ -9,7 +11,7 @@ public static class LuaTable
//
// Add the UI_TEXT_CONTENT table:
//
sb.AppendLine($$"""{{tableVariableName}} = {}""");
sb.AppendLineLF($$"""{{tableVariableName}} = {}""");
foreach (var kvp in keyValuePairs.OrderBy(x => x.Key))
{
if (cancellationToken.IsCancellationRequested)
@@ -32,11 +34,11 @@ public static class LuaTable
keyWithoutPrefix = keyWithoutPrefix.Replace(".", "::");
// Add a comment with the original text content:
sb.AppendLine();
sb.AppendLine($"-- {commentValue}");
sb.AppendLineLF();
sb.AppendLineLF($"-- {commentValue}");
// Add the assignment to the UI_TEXT_CONTENT table:
sb.AppendLine($"""
sb.AppendLineLF($"""
UI_TEXT_CONTENT["{keyWithoutPrefix}"] = "{LuaTools.EscapeLuaString(value)}"
""");
}