Skip to content

Commit

Permalink
fix: fix RecursionError for lists
Browse files Browse the repository at this point in the history
ref: #356
  • Loading branch information
lepture committed Sep 29, 2023
1 parent 68a2814 commit 44cc62b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mistune/list_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ def _parse_list_item(block, bullet, groups, token, state, rules):
)
state.cursor = m.end() + 1
break

if tok_type == 'list':
break

tok_index = len(state.tokens)
end_pos = block.parse_method(m, state)
if end_pos:
Expand Down

0 comments on commit 44cc62b

Please sign in to comment.