There was an error while loading. Please reload this page.
1 parent 66b2171 commit b77ee58Copy full SHA for b77ee58
1 file changed
src/mistune/_inline/links.py
@@ -21,8 +21,8 @@ def parse_link(inline: "InlineParser", m: Match[str], state: InlineState) -> Opt
21
marker = m.group(0)
22
is_image = marker[0] == "!"
23
if is_image and inline.max_image_depth > 0 and state.image_depth >= inline.max_image_depth:
24
- state.append_token({"type": "text", "raw": marker})
25
- return pos
+ state.append_token({"type": "text", "raw": marker + state.src[pos:]})
+ return len(state.src)
26
if not is_image and state.in_link:
27
state.append_token({"type": "text", "raw": marker})
28
return pos
0 commit comments