Skip to content

Commit

Permalink
Replace backslashes only on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed Aug 21, 2022
1 parent 707ceac commit ad8a187
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mkdocs_redirects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def on_files(self, files, config, **kwargs):
# Build a dict of known document pages to validate against later
self.doc_pages = {}
for page in files.documentation_pages(): # object type: mkdocs.structure.files.File
self.doc_pages[page.src_path.replace('\\', '/')] = page
self.doc_pages[page.src_path.replace(os.sep, '/')] = page

# Create HTML files for redirects after site dir has been built
def on_post_build(self, config, **kwargs):
Expand Down

0 comments on commit ad8a187

Please sign in to comment.