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

Anchors missing on some pages #483

Closed
greg0ire opened this issue May 30, 2023 · 4 comments
Closed

Anchors missing on some pages #483

greg0ire opened this issue May 30, 2023 · 4 comments

Comments

@greg0ire
Copy link
Member

greg0ire commented May 30, 2023

I wanted to easily copy a link to a title in a documentation page, such as https://www.doctrine-project.org/contribute/index.html#coding-standard-check, and couldn't find any, although such handy anchors are present for instance on https://www.doctrine-project.org/projects/doctrine-orm/en/stable/tutorials/pagination.html

The code responsible for this seems to be here:

private function fixHeaderAnchors(string $contents): string
{
return preg_replace(
'/<div class="section" id="(.*)">\n<h(\d)>(.*)<\/h(\d)>/',
'<div class="section"><a class="section-anchor" id="$1" name="$1"></a><h$2 class="section-header"><a href="#$1">$3<i class="fas fa-link"></i></a></h$2>',
$contents,
);
}

@SenseException
Copy link
Member

Looks like the project docs are getting the anchor link while the website itself doesn't.

@jaapio
Copy link
Contributor

jaapio commented Sep 18, 2024

I fixed this in #594 :-)

@jaapio
Copy link
Contributor

jaapio commented Sep 28, 2024

This issue can be closed now?

@greg0ire
Copy link
Member Author

Absolutely!

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

No branches or pull requests

3 participants