From 04264b418674edf612267f4b63befe5325ff09a4 Mon Sep 17 00:00:00 2001 From: miyaji255 <84168445+miyaji255@users.noreply.github.com> Date: Thu, 2 May 2024 11:21:48 +0900 Subject: [PATCH] fmt --- Epub/KoeBook.Epub/Services/ScrapingNaroService.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Epub/KoeBook.Epub/Services/ScrapingNaroService.cs b/Epub/KoeBook.Epub/Services/ScrapingNaroService.cs index 8daa51c..6741549 100644 --- a/Epub/KoeBook.Epub/Services/ScrapingNaroService.cs +++ b/Epub/KoeBook.Epub/Services/ScrapingNaroService.cs @@ -213,12 +213,12 @@ internal static string GetNcode(string url) return uri.Segments switch { - // https://ncode.syosetu.com/n0000a/ のとき - ["/", var ncode] when IsAscii(ncode) => ncode.TrimEnd('/'), - // https://ncode.syosetu.com/n0000a/12 のとき - ["/", var ncode, var num] when IsAscii(ncode) && num.TrimEnd('/').All(char.IsAsciiDigit) => ncode.TrimEnd('/'), - // https://ncode.syosetu.com/novelview/infotop/ncode/n0000a/ のとき - ["/", "novelview/", "infotop/", "ncode/", var ncode] when IsAscii(ncode) => ncode.TrimEnd('/'), + // https://ncode.syosetu.com/n0000a/ のとき + ["/", var ncode] when IsAscii(ncode) => ncode.TrimEnd('/'), + // https://ncode.syosetu.com/n0000a/12 のとき + ["/", var ncode, var num] when IsAscii(ncode) && num.TrimEnd('/').All(char.IsAsciiDigit) => ncode.TrimEnd('/'), + // https://ncode.syosetu.com/novelview/infotop/ncode/n0000a/ のとき + ["/", "novelview/", "infotop/", "ncode/", var ncode] when IsAscii(ncode) => ncode.TrimEnd('/'), _ => throw new EbookException(ExceptionType.InvalidUrl), };