From 8fc177c730410644e6f53bbdcb0f5c1901344442 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Sun, 27 Feb 2022 16:16:20 +0100 Subject: [PATCH] fix new line formatting for discord log --- BGS/DiscordLogGenerator.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/BGS/DiscordLogGenerator.cs b/BGS/DiscordLogGenerator.cs index c83d6a2..7e2c9a6 100644 --- a/BGS/DiscordLogGenerator.cs +++ b/BGS/DiscordLogGenerator.cs @@ -61,18 +61,19 @@ namespace EliteBGS.BGS { foreach (Objective objective in objectives) { StringBuilder objlog = new StringBuilder(); - objlog.AppendFormat("{0}\n", GenerateObjectiveHeader(objective)); + log.AppendFormat("{0}\n", GenerateObjectiveHeader(objective)); foreach (LogFormatter formatter in formatters) { string text = formatter.GenerateLog(objective); + text = text.Trim(); if (!string.IsNullOrEmpty(text)) { - objlog.AppendFormat("{0}\n", text.Trim()); + objlog.AppendFormat("{0}\n\n", text); } } - objlog.AppendFormat("{0}\n", GenerateObjectiveFooter(objective)); - log.AppendFormat("{0}\n", objlog.ToString().Trim()); + + log.AppendFormat("{0}\n", GenerateObjectiveFooter(objective)); } log.AppendFormat("{0}\n", GenerateFooter());