Skip to content

Conversation

@jwise
Copy link

@jwise jwise commented Oct 17, 2025

Pull Request Checklist

  • I’ve read the guidelines for contributing.
  • I updated AUTHORS.txt and CHANGES.txt (if the change is non-trivial) and documentation (if applicable).
  • I tested my changes.

Description

This implements #3865 -- as seen in production on https://joshuawise.com/ .

Copy link
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

if self.strip_indexes and link[-(1 + index_len):] == '/' + self.index_file:
link = link[:-index_len]
if self.strip_extensions and link[-len(extension):] == extension:
link = link[:-len(extension)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While above you explicitly handle .html, here you handle general extensions. This doesn't fit together.

How about making STRIP_EXTENSIONS a list instead that provides a list of extensions that will be stripped? Then users can explicitly configure to strip .html but not .php, or both, or ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants