Skip to content

Commit

Permalink
little refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
lgc2333 authored Apr 27, 2024
1 parent 84fab72 commit c407a49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/scripts/generate-images-table.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ def replace_file(content: str, inner: str) -> str:
if start_index == -1 or end_index == -1 or start_index >= end_index:
raise ValueError("Invalid table start or end mark")

pfx = content[: content.index(START) + len(START)]
sfx = content[content.index(END) :]
pfx = content[: start_index + len(START)]
sfx = content[end_index :]
return f"{pfx}\n\n{inner}\n\n{sfx}"


Expand Down

0 comments on commit c407a49

Please sign in to comment.