mirror of https://gitlab.com/bashrc2/epicyon
Remove unused characters before converting post to html
parent
2948264173
commit
9eaf4c4cdc
|
@ -302,8 +302,11 @@ def auto_translate_post(base_dir: str, post_json_object: {},
|
|||
lang_list = \
|
||||
libretranslate_languages(libretranslate_url, libretranslate_api_key)
|
||||
for lang in lang_list:
|
||||
content = None
|
||||
if msg_object['contentMap'].get(lang):
|
||||
content = msg_object['contentMap'][lang]
|
||||
if not content:
|
||||
continue
|
||||
translated_text = \
|
||||
libretranslate(libretranslate_url, content,
|
||||
lang, system_language,
|
||||
|
|
|
@ -2055,6 +2055,9 @@ def individual_post_as_html(signing_priv_key_pem: str,
|
|||
|
||||
if not is_pgp_encrypted(content_str):
|
||||
if not is_patch:
|
||||
# remove any tabs
|
||||
content_str = \
|
||||
content_str.replace('\t', '').replace('\r', '')
|
||||
# Add bold text
|
||||
if bold_reading and \
|
||||
not displaying_ciphertext and \
|
||||
|
|
Loading…
Reference in New Issue