diff --git a/bin/update-backlinks b/bin/update-backlinks index f405694..6d92f9b 100755 --- a/bin/update-backlinks +++ b/bin/update-backlinks @@ -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)