fix: 修复分段超过分段长度限制 (#577)

This commit is contained in:
shaohuzhang1 2024-05-29 12:00:56 +08:00 committed by GitHub
parent 5fbdee8338
commit ed7ddfbc59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -163,7 +163,7 @@ def parse_level(text, pattern: str):
:param pattern: 正则
:return: 符合正则的文本
"""
level_content_list = list(map(to_tree_obj, re_findall(pattern, text)))
level_content_list = list(map(to_tree_obj, [r[0:255] for r in re_findall(pattern, text) if r is not None]))
return list(map(filter_special_symbol, level_content_list))