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

Make sure all anchors are created for RST links #1536

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

felixfontein
Copy link
Contributor

Fixes #1535.

Running the script on the source of https://gist.github.com/felixfontein/5ec5ad555ba6cdb293beb04c83280c90 produces:

<a name="test-section"></a>
<h2>Test section</h2>
<p>Link: <a class="reference internal" href="#target">link to target</a>.</p>
<a name="target-section"></a>
<a name="target"></a>
<h2>Target section</h2>
<p>The link should point to this section's title.</p>

Here both expected anchors (the auto-generated one from the section title, and the one from the label) are created.

On my system rest2html generates quite some different markup
so I'm not sure whether this actually works.
@felixfontein
Copy link
Contributor Author

Is there actually any interest in contributions to this repository? If not, maybe that should be explicitly mentioned... https://github.com/github/markup/blob/master/CONTRIBUTING.md seemed to indicate to me that contributions are wanted...

Copy link

github-actions bot commented Sep 4, 2024

Stale pull request message

Copy link
Member

@jmeridth jmeridth left a comment

Choose a reason for hiding this comment

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

@felixfontein I tested your change locally. Thank you for the contribution. It is greatly appreciated.

@jmeridth jmeridth merged commit 914839f into github:master Sep 4, 2024
@felixfontein felixfontein deleted the fix-rst-links branch September 5, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reStructured Text links to labels in same document do not work
2 participants