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

Fixed path bug with links in SVG inheritance diagrams #10576

Closed
wants to merge 1 commit into from

Conversation

ayshih
Copy link
Contributor

@ayshih ayshih commented Jun 18, 2022

Subject: Fixes links in SVG inheritance diagrams when those diagrams are in documents not at the base level

Feature or Bugfix

  • Bugfix

Purpose

Currently, links in SVG inheritance diagrams only work when the documents are at the base level. That's because the URIs supplied to the diagram are relative to the document (as is appropriate for PNG output), but the SVGs live in the /_images folder, so the URIs need to be relative to that location. There is a hard-coded '../' that gets prepended to the URIs, which fixes only base-level documents. Documents in sub-directories result in SVG links that have one or more extraneous '../' that break the links.

Detail

This PR fixes the URIs to be relative to the image directory prior to making the SVG inheritance diagrams.

Relates

Fixes #10570

@ayshih
Copy link
Contributor Author

ayshih commented Jun 19, 2022

Note that this PR fixes a bug in Sphinx that is unrelated to any use of third-party extensions (e.g., sphinx_automodapi).

Non-exhaustive list of issues that this PR closes: #3176, sunpy/sunpy#2097, astropy/astropy#4935, probabilistic-numerics/probnum#459

Related issues:

@ayshih
Copy link
Contributor Author

ayshih commented Sep 27, 2022

Closing this PR since #10614 is more encompassing

@ayshih ayshih closed this Sep 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant