Skip to content

Avoid link with same ID's #152

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

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

alamirault
Copy link
Contributor

@alamirault alamirault commented Mar 25, 2023

Hello,

This PR try to generate unique link id.

Relative issues in symfony docs:

symfony/symfony-docs#16417
symfony/symfony-docs#16721

rst-parser instantiate NodeRenderer for each node so the only way I found is to use static property and save when id is already rendered on same page.

Examples of changes on symfony-docs:

alamirault/sf-doc-output@45a5281

@alamirault alamirault requested a review from javiereguiluz April 4, 2023 15:02
Copy link
Collaborator

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

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

Thanks Antoine for fixing this annoying bug 🙇

@alamirault
Copy link
Contributor Author

New issue opened symfony/symfony-docs#18194

Merging this PR will be very cool 😃

class TitleNodeRenderer implements NodeRenderer
{
/** @var TitleNode */
private $titleNode;
Copy link
Contributor

Choose a reason for hiding this comment

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

@javiereguiluz can we use typed properties?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's check that ... but do it in other PR so we can merge and deploy this one as soon as possible. Thanks.

@javiereguiluz
Copy link
Collaborator

Thanks Antoine! Let's now tag a new version and deploy it in production so these issues can be fixed soon. Cheers!

@javiereguiluz javiereguiluz merged commit e74e0c6 into symfony-tools:main Apr 13, 2023
@alamirault alamirault deleted the not-multiple-id branch April 13, 2023 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants