-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
Description of bug / unexpected behavior
The first and third SurroundingRectangle
in the image below is way taller than the second one. The issue of it being too tall seems to arise only when there is leading whitespace in a line of code.
Expected behavior
I expect every SurroundingRectangle
to have the height of the one on line 5 of the image.
How to reproduce the issue
Code for reproducing the problem
Driver code:
from manim import *
class Test(Scene):
def construct(self):
code = Code("test.py", language="python")
self.add(
code,
SurroundingRectangle(code.code_lines[1]),
SurroundingRectangle(code.code_lines[4]),
SurroundingRectangle(code.code_lines[8])
)
test.py:
def foo():
print("bar")
print("foobar")
def bar():
print("foo")
for number in range(1, 9):
print(number)
Additional media files

Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🆕 New