mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
ea6db6fe92
commit
1d4275d441
2 changed files with 19 additions and 12 deletions
|
|
@ -988,18 +988,17 @@ def extract_all_boxed(latex_str: str) -> List[str]:
|
|||
|
||||
# Count braces to find matching closing brace
|
||||
while j < len(latex_str) and depth > 0:
|
||||
if latex_str[j] == '{':
|
||||
if latex_str[j] == "{":
|
||||
depth += 1
|
||||
elif latex_str[j] == '}':
|
||||
elif latex_str[j] == "}":
|
||||
depth -= 1
|
||||
j += 1
|
||||
|
||||
if depth == 0:
|
||||
# Extract content between braces
|
||||
content = latex_str[start:j-1].strip()
|
||||
content = latex_str[start : j - 1].strip()
|
||||
results.append(content)
|
||||
|
||||
i = j
|
||||
|
||||
return results
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue