Skip to content

Commit

Permalink
Fixed empty lines being added to the end of output mgcb.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martenfur committed Dec 2, 2019
1 parent bde59ac commit ba63f60
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion NoPipeline/NoPipeline/Content.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public string Build()
builder.Append(item.ToString());
}

builder.AppendLine();
RemoveTrailingBlankLines(builder);

return builder.ToString();
}
Expand Down Expand Up @@ -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);
}
}
}
}

0 comments on commit ba63f60

Please sign in to comment.