Skip to content

Commit

Permalink
Remove unneeded code path
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed Sep 18, 2022
1 parent 30ce6c3 commit 152f737
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions mkdocs_redirects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,7 @@ def get_relative_html_path(old_page, new_page, use_directory_urls):
old_path = get_html_path(old_page, use_directory_urls)
new_path, new_hash_fragment = _split_hash_fragment(new_page)

if use_directory_urls:
# remove /index.html from end of path
new_path = posixpath.dirname(new_path) or './'

relative_path = posixpath.relpath(new_path, start=posixpath.dirname(old_path))

if use_directory_urls:
relative_path = relative_path + '/'

Expand Down

0 comments on commit 152f737

Please sign in to comment.