mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +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
|
n_spaces = get_indent(line) + 4
|
||||||
elif in_construct:
|
elif in_construct:
|
||||||
if len(line.strip()) > 0 and get_indent(line) < n_spaces:
|
if len(line.strip()) > 0 and get_indent(line) < n_spaces:
|
||||||
prev_line_num = index - 2
|
prev_line_num = index - 1
|
||||||
break
|
break
|
||||||
if prev_line_num is None:
|
if prev_line_num is None:
|
||||||
prev_line_num = len(lines) - 2
|
prev_line_num = len(lines) - 1
|
||||||
elif line_marker.isdigit():
|
elif line_marker.isdigit():
|
||||||
# Treat the argument as a line number
|
# Treat the argument as a line number
|
||||||
prev_line_num = int(line_marker) - 1
|
prev_line_num = int(line_marker) - 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue