Skip to content

Commit 44cc62b

Browse files
committed
fix: fix RecursionError for lists
ref: #356
1 parent 68a2814 commit 44cc62b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mistune/list_parser.py

+4
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ def _parse_list_item(block, bullet, groups, token, state, rules):
146146
)
147147
state.cursor = m.end() + 1
148148
break
149+
150+
if tok_type == 'list':
151+
break
152+
149153
tok_index = len(state.tokens)
150154
end_pos = block.parse_method(m, state)
151155
if end_pos:

0 commit comments

Comments
 (0)