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 ignore links to #top when checking anchors #2519

Merged
merged 2 commits into from
Jun 12, 2024
Merged

fix ignore links to #top when checking anchors #2519

merged 2 commits into from
Jun 12, 2024

Conversation

amtanq
Copy link
Contributor

@amtanq amtanq commented Jun 10, 2024

Fixes #2495

// HTML specs state a special anchor: "top" (case-insensitive)
// which is used to refer to the start of the page
// https://html.spec.whatwg.org/#select-the-indicated-part
if anchor.eq_ignore_ascii_case("top") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it the right place to do it? This checks for the anchors in the heading, it feels like this check should be before calling that function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated!

@Keats Keats merged commit 0b54cfc into getzola:next Jun 12, 2024
5 checks passed
Keats pushed a commit that referenced this pull request Jun 20, 2024
* fix ignore links to #top when checking anchors

* move logic to check internal links

---------

Co-authored-by: Tanishq <tanishq@levels.fyi>
berdandy pushed a commit to berdandy/azola that referenced this pull request Sep 17, 2024
* fix ignore links to #top when checking anchors

* move logic to check internal links

---------

Co-authored-by: Tanishq <tanishq@levels.fyi>
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