Less indentation

merge-requests/30/head
Bob Mottram 2024-08-30 13:25:23 +01:00
parent 577bf923c1
commit da66e2744d
1 changed files with 108 additions and 107 deletions

View File

@ -472,10 +472,8 @@ def replace_emoji_from_tags(session, base_dir: str,
if not tag_url: if not tag_url:
continue continue
icon_name = tag_url.split('/')[-1] icon_name = tag_url.split('/')[-1]
if icon_name:
if len(icon_name) > 1: if len(icon_name) > 1:
if icon_name[0].isdigit(): if icon_name[0].isdigit() and '.' in icon_name:
if '.' in icon_name:
icon_name = icon_name.split('.')[0] icon_name = icon_name.split('.')[0]
# see https://unicode.org/ # see https://unicode.org/
# emoji/charts/full-emoji-list.html # emoji/charts/full-emoji-list.html
@ -950,7 +948,8 @@ def _add_mention(base_dir: str, word_str: str, http_prefix: str,
if '@' not in follow: if '@' not in follow:
continue continue
follow_nick = follow.split('@')[0] follow_nick = follow.split('@')[0]
if possible_nickname == follow_nick: if possible_nickname != follow_nick:
continue
follow_str = remove_eol(follow) follow_str = remove_eol(follow)
replace_domain = follow_str.split('@')[1] replace_domain = follow_str.split('@')[1]
recipient_actor = \ recipient_actor = \
@ -976,7 +975,9 @@ def _add_mention(base_dir: str, word_str: str, http_prefix: str,
continue continue
pet = remove_eol(petnames[follow_ctr]) pet = remove_eol(petnames[follow_ctr])
if pet: if pet:
if possible_nickname == pet: if possible_nickname != pet:
follow_ctr += 1
continue
follow_str = remove_eol(follow) follow_str = remove_eol(follow)
replace_nickname = follow_str.split('@')[0] replace_nickname = follow_str.split('@')[0]
replace_domain = follow_str.split('@')[1] replace_domain = follow_str.split('@')[1]