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

Check utf8 relative anchors #842

Merged
merged 3 commits into from
May 29, 2024

Conversation

ahpook
Copy link
Contributor

@ahpook ahpook commented May 23, 2024

This adds a test for the false-negative failures seen in #757 - the root cause was an interaction between the (now-removed) regexp in the clean_url! method and Addressable::URI's normalize. The test passes now that #820 is merged but the test should prevent regressions in the future.

There wasn't a specific test for this, and it fails on some setups.

The link in the fixture is a direct copy-paste from one that fails on my project.

But the test passes on this test suite... So there is something else going on.

Relates to gjtorikian#757
Looking a little deeper into the source code of the failures, I noticed that not _all_ the non-ASCII links were failing, only some of them. The site gets built with relative links between pages, and it was links to another page with a "../page/#hash" syntax which failed.

This commit adds a test directory which mimics that structure and reliably reproduces the error... I think!
@ahpook ahpook requested a review from gjtorikian as a code owner May 23, 2024 20:56
@gjtorikian gjtorikian enabled auto-merge May 29, 2024 20:19
@gjtorikian
Copy link
Owner

Rad, thank you!

@gjtorikian gjtorikian merged commit 4cc3f62 into gjtorikian:main May 29, 2024
3 checks 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.

3 participants