mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-13 10:47:21 +00:00
Added an analyzer which keeps line breaks LF on every system (#1193)
This commit is contained in:
1 parent
b1c1f13993
commit
65d50de033
96 files changed
+741
-393
No files matched your search
@@ -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)}"
|
||||
""");
|
||||
}
|
||||
|
||||
@@ -7,4 +7,8 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SourceCodeRules\SourceCodeRules\SourceCodeRules.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace SharedTools;
|
||||
namespace SharedTools.Text;
|
||||
|
||||
/// <summary>
|
||||
/// Appends lines with LF, the same line break on every system.
|
||||
Reference in new issue
Block a user