Improve moedict title sanitization

This commit is contained in:
Marvin Elsen 2024-10-10 22:42:50 +02:00
parent 90b86df4b4
commit 5202765a09
Signed by: marvinelsen
GPG Key ID: 820672408CC318C2
2 changed files with 3 additions and 1 deletions

View File

@ -5,7 +5,7 @@ plugins {
}
group = "com.marvinelsen"
version = "2.0.0"
version = "2.0.1"
repositories {
mavenCentral()

View File

@ -366,7 +366,9 @@ private fun String.sanitizeMoeZhuyin() = this
private fun String.sanitizeMoeTitle() = this
.replace(""".*""".toRegex(), "")
.replace(""".*\)""".toRegex(), "")
.replace("""\(.*""".toRegex(), "")
.replace("""\(.*\)""".toRegex(), "")
private fun PinyinSyllable.toSearchablePinyinWithToneNumbers() =
this.format(TransliterationSystem.PINYIN_WITH_TONE_NUMBERS).lowercase()