1
0
mirror of https://github.com/jfilter/clean-text.git synced 2021-09-19 22:32:58 +03:00

case insensitive lang param

This commit is contained in:
Johannes Filter
2020-07-24 21:50:34 +02:00
parent 28d379b478
commit 5077c4fa28

View File

@@ -71,6 +71,7 @@ def to_ascii_unicode(text, lang="en"):
# normalize quotes before since this improves transliteration quality
text = fix_strange_quotes(text)
lang = lang.lower()
# special handling for German text to preserve umlauts
if lang == "de":
text = save_replace(text, lang=lang)