Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve wiki link handling #1184

Merged

Conversation

patrickdemers6
Copy link
Contributor

Closes #830.

A few issues with wiki links have been resolved:

  • Wiki pages denoted by /w were not handled properly.
  • Wiki pages with /wiki in them multiple times would not resolve.
  • Wiki pages with a dash in them were not matched by regex.
  • Links to the default wiki page for a subreddit did not redirect properly.

Testing

I'd recommend sending yourself a message with links for easy test data.

Regular wiki page
https://www.reddit.com/r/science/wiki/rules/

Wiki page with multiple slashes
https://www.reddit.com/r/bodyweightfitness/w/exercises/handstand

** Wiki pages with dashes **
https://www.reddit.com/r/bodyweightfitness/w/exercises/l-sit
https://www.reddit.com/r/bodyweightfitness/wiki/exercises/l-sit

Links ending in w or wiki resolve to the default wiki page /index
https://www.reddit.com/r/bodyweightfitness/w/
https://www.reddit.com/r/bodyweightfitness/wiki/

@Docile-Alligator Docile-Alligator merged commit 28ca5e6 into Docile-Alligator:master Nov 2, 2022
@Docile-Alligator
Copy link
Owner

Thank you!

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.

Some links open in webview
2 participants