Skip to content

Commit

Permalink
v2.5.26: 解析oname时兼容括号未闭合情况
Browse files Browse the repository at this point in the history
  • Loading branch information
hect0x7 committed Dec 24, 2024
1 parent 6a63e93 commit 37e1d67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/jmcomic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 被依赖方 <--- 使用方
# config <--- entity <--- toolkit <--- client <--- option <--- downloader

__version__ = '2.5.25'
__version__ = '2.5.26'

from .api import *
from .jm_plugin import *
Expand Down
6 changes: 5 additions & 1 deletion src/jmcomic/jm_toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,11 @@ def find_right_pair(left_pair, i):
add()
# 定位右括号
j = find_right_pair(c, i)
ExceptionTool.require_true(j != -1, f'未闭合的 {c}{bracket_map[c]}: {title[i:]}')
if j == -1:
# 括号未闭合
char_list.append(c)
i += 1
continue
# 整个括号的单词结束
add(title[i:j])
# 移动指针
Expand Down

0 comments on commit 37e1d67

Please sign in to comment.