cassanof 10 months ago
parent 7f7a4c586c
commit 7f591653c4

@ -26,7 +26,10 @@ def parse_first_func(code: str, lang: str) -> Optional[str]:
last_i = i
break
if def_i == 0 or last_i == 0:
if last_i == 0:
last_i = len(code_lines) - 1
if def_i == 0:
return None
return "\n".join(code_lines[def_i:last_i+1])

Loading…
Cancel
Save