mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
add warning for slicing methods
This commit is contained in:
parent
11af9508f2
commit
d744311f15
1 changed files with 7 additions and 2 deletions
|
@ -404,9 +404,14 @@ class Text(SVGMobject):
|
||||||
kwargs[short_name] = kwargs.pop(long_name)
|
kwargs[short_name] = kwargs.pop(long_name)
|
||||||
|
|
||||||
def get_parts_by_text(self, word):
|
def get_parts_by_text(self, word):
|
||||||
if not self.apply_space_chars:
|
if self.is_markup:
|
||||||
log.warning(
|
log.warning(
|
||||||
"Slicing Text without applying spaces, "
|
"Slicing MarkupText via `get_parts_by_text`, "
|
||||||
|
"the result could be unexpected."
|
||||||
|
)
|
||||||
|
elif not self.apply_space_chars:
|
||||||
|
log.warning(
|
||||||
|
"Slicing Text without applying spaces via `get_parts_by_text`, "
|
||||||
"the result could be unexpected."
|
"the result could be unexpected."
|
||||||
)
|
)
|
||||||
return VGroup(*(
|
return VGroup(*(
|
||||||
|
|
Loading…
Add table
Reference in a new issue