Skip to content

Commit

Permalink
Fix injecting backlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
umonkey committed Aug 5, 2024
1 parent 39ba296 commit 162142b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/update-backlinks
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ def test_has_placeholder():


def inject_backlinks(lines, parts):
try:
index = lines.index("__BACKLINKS__")
lines[index] = "__BACKLINKS__\n"
except ValueError:
pass

try:
index = lines.index("__BACKLINKS__\n")
lines[index] = "".join(parts)
Expand Down

0 comments on commit 162142b

Please # to comment.