mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Handle pulled linebreaks better (fixes #342)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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("<br />", "\n")
|
||||
.Replace("\r\n", "\n")
|
||||
.Replace("<br />\n", "<br />")
|
||||
.Replace("<br />", string.Empty)
|
||||
.Replace("</div>", string.Empty)
|
||||
.Replace("[+]", string.Empty)
|
||||
.ReplaceHtmlWithSiteCodes();
|
||||
oldComments = Regex.Replace(oldComments, @"<div .*?>", 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("<br />", "\n")
|
||||
.Replace("\r\n", "\n")
|
||||
.Replace("<br />\n", "<br />")
|
||||
.Replace("<br />", string.Empty)
|
||||
.Replace("</div>", string.Empty)
|
||||
.Replace("[+]", string.Empty)
|
||||
.ReplaceHtmlWithSiteCodes();
|
||||
|
||||
Reference in New Issue
Block a user