Commit b514a30 1 parent d9e4400 commit b514a30 Copy full SHA for b514a30
File tree 1 file changed +3
-3
lines changed
source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ import uy.kohesive.injekt.api.get
33
33
import java.net.URI
34
34
import java.net.URISyntaxException
35
35
import java.security.MessageDigest
36
- import java.util.Locale
37
36
38
37
/* *
39
38
* A simple implementation for sources from a website.
@@ -322,15 +321,16 @@ abstract class HttpSource : CatalogueSource {
322
321
protected open suspend fun getRelatedMangaListBySearch (manga : SManga ): List <SManga > {
323
322
fun String.stripKeyword (): List <String > {
324
323
val regexWhitespace = Regex (" \\ s+" )
325
- val regexSpecialCharacters = Regex (" [\\ [(!~@#$%^&*|,?:\" <>)\\ ]]" )
324
+ val regexSpecialCharacters =
325
+ Regex (" ([!~#$%^&*+_|/\\\\ ,?:;'“”‘’\" <>(){}\\ [\\ ]。・~:—!?、―«»《》〘〙【】「」|]|\\ s-|-\\ s|\\ s\\ .|\\ .\\ s)" )
326
326
val regexNumberOnly = Regex (" ^\\ d+$" )
327
327
328
328
return replace(regexSpecialCharacters, " " )
329
329
.split(regexWhitespace)
330
330
.map {
331
331
// remove number only
332
332
it.replace(regexNumberOnly, " " )
333
- .lowercase(Locale .getDefault() )
333
+ .lowercase()
334
334
}
335
335
// exclude single character
336
336
.filter { it.length > 1 }
You can’t perform that action at this time.
0 commit comments