From 0a21c1dc3be4242d362d5863958810ed47c53b53 Mon Sep 17 00:00:00 2001 From: Christiaan Bloemendaal Date: Fri, 23 Feb 2024 17:52:27 +0100 Subject: [PATCH] fix: remove empty entries when splitting --- src/Mangarr.Stack/Formatting/FormattingService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mangarr.Stack/Formatting/FormattingService.cs b/src/Mangarr.Stack/Formatting/FormattingService.cs index 42aa6e6..d8aead9 100644 --- a/src/Mangarr.Stack/Formatting/FormattingService.cs +++ b/src/Mangarr.Stack/Formatting/FormattingService.cs @@ -41,7 +41,7 @@ RequestedChapterDocument requestedChapterDocument formatted = formatted.Replace("{chapterNumber}", requestedChapterDocument.ChapterNumber.ToString()); formatted = formatted.ReplaceAll(string.Empty, - _settingsApi.Formatting.Strip?.Split(" ") ?? Array.Empty()); + _settingsApi.Formatting.Strip?.Split(" ", StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty()); formatted = formatted.ReplaceAll(_settingsApi.Formatting.InvalidCharacterReplacement, Path.GetInvalidPathChars().Select(x => x.ToString()));