mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 09:09:16 +01:00
removed empty line
added test case
This commit is contained in:
parent
4aba3b4c37
commit
7d64fee22c
@ -37,7 +37,6 @@ object ChapterRecognition {
|
||||
*/
|
||||
private val unwantedWhiteSpace = Regex("""(\s)(extra|special|omake)""")
|
||||
|
||||
|
||||
fun parseChapterNumber(chapter: SChapter, manga: SManga) {
|
||||
// If chapter number is known return.
|
||||
if (chapter.chapter_number == -2f || chapter.chapter_number > -1f)
|
||||
|
@ -58,6 +58,17 @@ class ChapterRecognitionTest {
|
||||
assertThat(chapter.chapter_number).isEqualTo(4f)
|
||||
}
|
||||
|
||||
/**
|
||||
* Ch. xx base case but space after period
|
||||
*/
|
||||
@Test fun ChCaseBase2() {
|
||||
createManga("Mokushiroku Alice")
|
||||
|
||||
createChapter("Mokushiroku Alice Vol. 1 Ch. 4: Misrepresentation")
|
||||
ChapterRecognition.parseChapterNumber(chapter, manga)
|
||||
assertThat(chapter.chapter_number).isEqualTo(4f)
|
||||
}
|
||||
|
||||
/**
|
||||
* Ch.xx.x base case
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user