Improve moedict title sanitization
This commit is contained in:
parent
90b86df4b4
commit
5202765a09
@ -5,7 +5,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.marvinelsen"
|
group = "com.marvinelsen"
|
||||||
version = "2.0.0"
|
version = "2.0.1"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -366,7 +366,9 @@ private fun String.sanitizeMoeZhuyin() = this
|
|||||||
|
|
||||||
private fun String.sanitizeMoeTitle() = this
|
private fun String.sanitizeMoeTitle() = this
|
||||||
.replace("""(.*)""".toRegex(), "")
|
.replace("""(.*)""".toRegex(), "")
|
||||||
|
.replace("""(.*\)""".toRegex(), "")
|
||||||
.replace("""\(.*)""".toRegex(), "")
|
.replace("""\(.*)""".toRegex(), "")
|
||||||
|
.replace("""\(.*\)""".toRegex(), "")
|
||||||
|
|
||||||
private fun PinyinSyllable.toSearchablePinyinWithToneNumbers() =
|
private fun PinyinSyllable.toSearchablePinyinWithToneNumbers() =
|
||||||
this.format(TransliterationSystem.PINYIN_WITH_TONE_NUMBERS).lowercase()
|
this.format(TransliterationSystem.PINYIN_WITH_TONE_NUMBERS).lowercase()
|
||||||
|
Loading…
Reference in New Issue
Block a user