Skip to content

Commit 37e1d67

Browse files
committed
v2.5.26: 解析oname时兼容括号未闭合情况
1 parent 6a63e93 commit 37e1d67

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/jmcomic/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# 被依赖方 <--- 使用方
33
# config <--- entity <--- toolkit <--- client <--- option <--- downloader
44

5-
__version__ = '2.5.25'
5+
__version__ = '2.5.26'
66

77
from .api import *
88
from .jm_plugin import *

src/jmcomic/jm_toolkit.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,11 @@ def find_right_pair(left_pair, i):
298298
add()
299299
# 定位右括号
300300
j = find_right_pair(c, i)
301-
ExceptionTool.require_true(j != -1, f'未闭合的 {c}{bracket_map[c]}: {title[i:]}')
301+
if j == -1:
302+
# 括号未闭合
303+
char_list.append(c)
304+
i += 1
305+
continue
302306
# 整个括号的单词结束
303307
add(title[i:j])
304308
# 移动指针

0 commit comments

Comments
 (0)