diff options
author | Nick Mathewson <nickm@torproject.org> | 2023-10-18 11:45:25 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2023-10-18 11:45:25 -0400 |
commit | c04c13936fc497526eb52f6510837d94e8772189 (patch) | |
tree | 597e93c26c65edb4cbffa2bf57ecf06df8743f48 /bin | |
parent | 3a4b8d38728ae504e75a0b2c864b0db50cf87119 (diff) | |
download | torspec-c04c13936fc497526eb52f6510837d94e8772189.tar.gz torspec-c04c13936fc497526eb52f6510837d94e8772189.zip |
Try to fix proposals redirects for md proposals
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/make_redirects.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/make_redirects.py b/bin/make_redirects.py index f7347c6..3e677ee 100755 --- a/bin/make_redirects.py +++ b/bin/make_redirects.py @@ -51,8 +51,10 @@ def proposal_redirects(proposals_dir): m = re.match(r'^(\d+)-.*\.(?:md|txt)$', fname) if m: source = m.group(1) + ".html" - target = fname - lines.append(f'"/{source}" = "./{target}"\n') + target, targetext = os.path.splitext(fname) + if targetext == '.md': + targetext = ".html" + lines.append(f'"/{source}" = "./{target}{targetext}"\n') lines.sort() return "".join(lines) |