fix: NameError 'i' not defined in row merge loop\n\n修改行合并逻辑时用了i但没有enumerate,导致NameError。\n修复:for rl in ocr_lines → for i, rl in enumerate(ocr_lines)
This commit is contained in:
+1
-1
@@ -3380,7 +3380,7 @@ class MessageMonitor:
|
||||
if _r and len(_r) >= 3:
|
||||
_known_bot_replies.add(self._norm_frag(_r))
|
||||
merged_lines = []
|
||||
for rl in ocr_lines:
|
||||
for i, rl in enumerate(ocr_lines):
|
||||
# 当前行含疑问特征(裸@末尾或问号)→ 不合并,防止用户问句被黏进bot回复
|
||||
if rl.endswith('@') or re.search(r'[??]', rl):
|
||||
merged_lines.append(rl)
|
||||
|
||||
Reference in New Issue
Block a user