mirror of
https://github.com/3b1b/manim.git
synced 2025-08-31 23:58:32 +00:00
Fix to embed insertion
This commit is contained in:
parent
1b1ba606ed
commit
77309a634b
1 changed files with 2 additions and 2 deletions
|
@ -228,10 +228,10 @@ def insert_embed_line(file_name: str, scene_name: str, line_marker: str):
|
|||
n_spaces = get_indent(line) + 4
|
||||
elif in_construct:
|
||||
if len(line.strip()) > 0 and get_indent(line) < n_spaces:
|
||||
prev_line_num = index - 2
|
||||
prev_line_num = index - 1
|
||||
break
|
||||
if prev_line_num is None:
|
||||
prev_line_num = len(lines) - 2
|
||||
prev_line_num = len(lines) - 1
|
||||
elif line_marker.isdigit():
|
||||
# Treat the argument as a line number
|
||||
prev_line_num = int(line_marker) - 1
|
||||
|
|
Loading…
Add table
Reference in a new issue