mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Inserted "self.embed" line should match passed in line number
This commit is contained in:
parent
7023548ec6
commit
b81f244c3c
1 changed files with 1 additions and 1 deletions
|
@ -185,7 +185,7 @@ def insert_embed_line(file_name, lineno):
|
|||
lines = fp.readlines()
|
||||
line = lines[lineno - 1]
|
||||
n_spaces = len(line) - len(line.lstrip())
|
||||
lines.insert(lineno - 1, " " * n_spaces + "self.embed()\n")
|
||||
lines.insert(lineno, " " * n_spaces + "self.embed()\n")
|
||||
|
||||
alt_file = file_name.replace(".py", "_inserted_embed.py")
|
||||
with open(alt_file, 'w') as fp:
|
||||
|
|
Loading…
Add table
Reference in a new issue