mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
803449f8b7
commit
4213d60b22
|
@ -1333,8 +1333,7 @@ def add_html_tags(base_dir: str, http_prefix: str,
|
||||||
|
|
||||||
# remove . for words which are not mentions
|
# remove . for words which are not mentions
|
||||||
new_words = []
|
new_words = []
|
||||||
for word_index in range(0, len(words)):
|
for _, word_str in enumerate(words):
|
||||||
word_str = words[word_index]
|
|
||||||
if word_str.endswith('.'):
|
if word_str.endswith('.'):
|
||||||
if not word_str.startswith('@'):
|
if not word_str.startswith('@'):
|
||||||
word_str = word_str[:-1]
|
word_str = word_str[:-1]
|
||||||
|
@ -1377,7 +1376,8 @@ def add_html_tags(base_dir: str, http_prefix: str,
|
||||||
append_tags = []
|
append_tags = []
|
||||||
for word_str in words:
|
for word_str in words:
|
||||||
word_len = len(word_str)
|
word_len = len(word_str)
|
||||||
if word_len > 2:
|
if word_len <= 2:
|
||||||
|
continue
|
||||||
if word_len > max_word_length:
|
if word_len > max_word_length:
|
||||||
long_words_list.append(word_str)
|
long_words_list.append(word_str)
|
||||||
first_char = word_str[0]
|
first_char = word_str[0]
|
||||||
|
@ -1401,7 +1401,6 @@ def add_html_tags(base_dir: str, http_prefix: str,
|
||||||
continue
|
continue
|
||||||
elif ':' in word_str:
|
elif ':' in word_str:
|
||||||
word_str2 = word_str.split(':')[1]
|
word_str2 = word_str.split(':')[1]
|
||||||
# print('TAG: emoji located - ' + word_str)
|
|
||||||
if not emoji_dict:
|
if not emoji_dict:
|
||||||
# emoji.json is generated so that it can be customized and
|
# emoji.json is generated so that it can be customized and
|
||||||
# the changes will be retained even if default_emoji.json
|
# the changes will be retained even if default_emoji.json
|
||||||
|
@ -1422,7 +1421,6 @@ def add_html_tags(base_dir: str, http_prefix: str,
|
||||||
if not emoji_dict.get(ename):
|
if not emoji_dict.get(ename):
|
||||||
emoji_dict[ename] = eitem
|
emoji_dict[ename] = eitem
|
||||||
|
|
||||||
# print('TAG: looking up emoji for :' + word_str2 + ':')
|
|
||||||
_add_emoji(base_dir, ':' + word_str2 + ':', http_prefix,
|
_add_emoji(base_dir, ':' + word_str2 + ':', http_prefix,
|
||||||
original_domain, replace_emoji, hashtags,
|
original_domain, replace_emoji, hashtags,
|
||||||
emoji_dict)
|
emoji_dict)
|
||||||
|
|
Loading…
Reference in New Issue