diff --git a/CHANGELIST.md b/CHANGELIST.md index 0b98f1f8..ee845741 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -15,6 +15,7 @@ - Add first attempt 2-layer ringcode guide - Add even more safety to clone - Sanitize filename after check +- Handle pulled linebreaks better ### 2.2 (2021-12-30) - Fix Saturn header finding diff --git a/MPF.Library/InfoTool.cs b/MPF.Library/InfoTool.cs index 23982392..18e3ed35 100644 --- a/MPF.Library/InfoTool.cs +++ b/MPF.Library/InfoTool.cs @@ -1396,9 +1396,13 @@ namespace MPF.Library string oldComments = info.CommonDiscInfo.Comments + (string.IsNullOrEmpty(info.CommonDiscInfo.Comments) ? string.Empty : "\n") + WebUtility.HtmlDecode(match.Groups[1].Value) - .Replace("
", "\n") + .Replace("\r\n", "\n") + .Replace("
\n", "
") + .Replace("
", string.Empty) + .Replace("", string.Empty) .Replace("[+]", string.Empty) .ReplaceHtmlWithSiteCodes(); + oldComments = Regex.Replace(oldComments, @"
", string.Empty); // Create state variables bool addToLast = false; @@ -1492,7 +1496,9 @@ namespace MPF.Library string oldContents = info.CommonDiscInfo.Contents + (string.IsNullOrEmpty(info.CommonDiscInfo.Contents) ? string.Empty : "\n") + WebUtility.HtmlDecode(match.Groups[1].Value) - .Replace("
", "\n") + .Replace("\r\n", "\n") + .Replace("
\n", "
") + .Replace("
", string.Empty) .Replace("
", string.Empty) .Replace("[+]", string.Empty) .ReplaceHtmlWithSiteCodes();