From ba63f600274e12f8fbb82db610b40e357ec5d90f Mon Sep 17 00:00:00 2001 From: Martenfur Date: Tue, 3 Dec 2019 00:35:49 +0300 Subject: [PATCH] Fixed empty lines being added to the end of output mgcb. --- NoPipeline/NoPipeline/Content.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/NoPipeline/NoPipeline/Content.cs b/NoPipeline/NoPipeline/Content.cs index 0de5849..990a723 100644 --- a/NoPipeline/NoPipeline/Content.cs +++ b/NoPipeline/NoPipeline/Content.cs @@ -58,7 +58,7 @@ public string Build() builder.Append(item.ToString()); } - builder.AppendLine(); + RemoveTrailingBlankLines(builder); return builder.ToString(); } @@ -188,5 +188,12 @@ public void CheckIntegrity(string rootPath) } + private void RemoveTrailingBlankLines(StringBuilder builder) + { + while(builder.ToString().EndsWith(Environment.NewLine)) + { + builder.Remove(builder.Length - Environment.NewLine.Length, Environment.NewLine.Length); + } + } } }