mirror of https://github.com/Mai-with-u/MaiBot.git
parent
dcebdb7a35
commit
23dbc501c9
|
|
@ -815,7 +815,7 @@ def parse_text_timestamps(text: str, mode: str = "normal") -> str:
|
||||||
|
|
||||||
# 从后向前替换,避免位置改变
|
# 从后向前替换,避免位置改变
|
||||||
converted_timestamps.reverse()
|
converted_timestamps.reverse()
|
||||||
for match, readable_time in converted_timestamps:
|
for ts, match, readable_time in converted_timestamps:
|
||||||
pattern_instance = re.escape(match.group(0))
|
pattern_instance = re.escape(match.group(0))
|
||||||
if readable_time in readable_time_used:
|
if readable_time in readable_time_used:
|
||||||
# 如果相同格式的时间已存在,替换为空字符串
|
# 如果相同格式的时间已存在,替换为空字符串
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue