mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 07:27:44 +00:00
Fix TexMobject.select_unisolated_substring for substrings with escape characters
This commit is contained in:
parent
db0770a4fd
commit
3bf5ce5776
1 changed files with 1 additions and 1 deletions
|
|
@ -561,7 +561,7 @@ class StringMobject(SVGMobject, ABC):
|
|||
|
||||
def select_unisolated_substring(self, substr: str) -> VGroup:
|
||||
result = []
|
||||
for match in re.finditer(substr.replace("\\", r"\\"), self.string):
|
||||
for match in re.finditer(re.escape(substr), self.string):
|
||||
index = match.start()
|
||||
start = self.substr_to_path_count(self.string[:index])
|
||||
end = start + self.substr_to_path_count(substr)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue