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

Fix input root url compare by normalizing #5

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

MQ37
Copy link
Collaborator

@MQ37 MQ37 commented Jan 17, 2025

When checking if the current url is the input root there may be issue with the trailing / if there is redirect. So instead of adding description and detail to top heading it is added as another link in the Index section.

Output for https://kopecky.io:

# kopecky.io

## Index

- [kopecky.io](https://kopecky.io/)
- [kopecky.io](https://kopecky.io/blog)
- [kopecky.io](https://kopecky.io/about)

Output for https://kopecky.io/:

# kopecky.io

## Index

- [kopecky.io](https://kopecky.io/blog)
- [kopecky.io](https://kopecky.io/about)

Fixed by normalizing the urls before comparing them by removing the trailing /.

@MQ37 MQ37 self-assigned this Jan 17, 2025
@MQ37 MQ37 merged commit 4f2275f into master Jan 17, 2025
1 check passed
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.

1 participant