diff --git a/source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSource.kt b/source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSource.kt index 2e258f640..b5abba5b7 100644 --- a/source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSource.kt +++ b/source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSource.kt @@ -321,12 +321,14 @@ abstract class HttpSource : CatalogueSource { protected open suspend fun fetchRelatedMangaListBySearch(manga: SManga): List { fun String.stripKeyword(): List { val regexWhitespace = Regex("\\s+") - // remove special character - return replace(Regex("[\\[(!~@#$%^&*|,?:\"<>)\\]]"), " ") + val regexSpecialCharacters = Regex("[\\[(!~@#$%^&*|,?:\"<>)\\]]") + val regexNumberOnly = Regex("^\\d+$") + + return replace(regexSpecialCharacters, " ") .split(regexWhitespace) .map { // remove number only - it.replace(Regex("^\\d+$"), "") + it.replace(regexNumberOnly, "") .lowercase(Locale.getDefault()) } // exclude single character