2
0

#113 whitespaces

This commit is contained in:
Glax 2024-02-07 15:29:42 +01:00
parent d8df6eccb1
commit 2eaeadb92c

View File

@ -28,12 +28,14 @@ public readonly struct Chapter : IComparable
this.chapterNumber = chapterNumber; this.chapterNumber = chapterNumber;
this.url = url; this.url = url;
string chapterName = string.Concat(LegalCharacters.Matches(name ?? "")); List<string> chapterNameStrings = new();
string volStr = volumeNumber is not null ? $"Vol.{volumeNumber} " : "";
string chNumberStr = $"Ch.{chapterNumber} "; if(volumeNumber is not null && volumeNumber.Length > 0)
string chNameStr = chapterName.Length > 0 ? $"- {chapterName}" : ""; chapterNameStrings.Add($"Vol.{volumeNumber}");
chNameStr = IllegalStrings.Replace(chNameStr, ""); chapterNameStrings.Add($"Ch.{chapterNumber}");
this.fileName = $"{volStr}{chNumberStr}{chNameStr}"; if(name is not null && name.Length > 0) //chapterName
chapterNameStrings.Add(IllegalStrings.Replace(string.Concat(LegalCharacters.Matches(name)), ""));
this.fileName = string.Join(' ', chapterNameStrings);
} }
public override string ToString() public override string ToString()