Sanitize whitespace around tabs

This commit is contained in:
Matt Nadareski
2022-04-16 12:15:23 -07:00
parent 97e9924a0b
commit be33db8339
2 changed files with 4 additions and 0 deletions

View File

@@ -60,6 +60,7 @@
- Convert triple space to tab
- Fix clone issue with copy protection
- Be more picky about multisession
- Sanitize whitespace around tabs
### 2.3 (2022-02-05)
- Start overhauling Redump information pulling, again

View File

@@ -1064,6 +1064,9 @@ namespace MPF.Library
value = value.Replace("<TAB>", "\t");
value = value.Replace(" ", "\t");
// Sanitize whitespace around tabs
value = Regex.Replace(value, @"\s*\t\s*", @"\t");
// If the value contains a newline
value = value.Replace("\r\n", "\n");
if (value.Contains("\n"))