Fix chapter number parsing when number is after unwanted tag

Fixes #554

Co-authored-by: Naputt1 <94742489+Naputt1@users.noreply.github.com>
This commit is contained in:
AntsyLich
2024-06-08 07:07:47 +06:00
parent 119bcbf8ed
commit 6a80305d6c
2 changed files with 36 additions and 17 deletions
@@ -171,6 +171,17 @@ class ChapterRecognitionTest {
assertChapter(mangaTitle, "Tokyo ESP 027: Part 002: Chapter 001", 027.0)
}
/**
* Case where the chapter title contains the unwanted tag
* But follow by chapter number.
*/
@Test
fun `Number after unwanted tag`() {
val mangaTitle = "One-punch Man"
assertChapter(mangaTitle, "Mag Version 195.5", 195.5)
}
@Test
fun `Unparseable chapter`() {
val mangaTitle = "random"