Skip to content

Commit 216df53

Browse files
authored
Enhancement: allow usage of custom Pygments styles in Code (#980)
1 parent 57f228b commit 216df53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manim/mobject/svg/code_mobject.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ def __init__(
206206
raise ValueError(
207207
"Neither a code file nor a code string have been specified."
208208
)
209-
self.style = self.style.lower()
209+
if isinstance(self.style, str):
210+
self.style = self.style.lower()
210211
self.gen_html_string()
211212
strati = self.html_string.find("background:")
212213
self.background_color = self.html_string[strati + 12 : strati + 19]

0 commit comments

Comments
 (0)