-
Notifications
You must be signed in to change notification settings - Fork 81
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 missing anchors for global variables (.. py:data::
)
#935
Comments
Eric-Arellano
changed the title
Fix missing anchors for
Fix missing anchors for global variables (May 17, 2024
.. py:data::
entries from utils module page.. py:data::
)
github-merge-queue bot
pushed a commit
that referenced
this issue
Sep 6, 2024
Closes #1401 and #935. We reuse `<Attribute>`, which actually works out quite well! It understands how to parse when the data object has a value assigned to it like `= "my_value"`. It can also properly detect `isDedicatedPage`. ![image](https://github.com/user-attachments/assets/dd938c50-3182-4573-a678-74271a3b72cf) There is one weird edge case: Qiskit was improperly using `.. py:data::` inside a table in `utils.mdx`. Naively, it would cause issues with trying to render the component inside the table, which does not work. I fixed it in Qiskit `main`, but it would be too time consuming to fix on 0.35+. So, we now have a line to skip over converting to an `Attribute` Component if the element is inside a table. That means the table will continue to render the same as before on those historical docs - the biggest downside is that anchor links still will be broken for the page. <img width="863" alt="Screenshot 2024-09-06 at 9 40 51 AM" src="https://github.com/user-attachments/assets/f7355c1f-ed50-4293-976d-42f02fdf6013"> A follow up will simplify our linters like checking for orphan pages, since this PR fixes a lot of those problems.
Fixed by #1917. The utils table is broken on historical versions, but we're not going to fix that because it's too finicky with modifying the HTML. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That is, remove these link checker ignores:
documentation/scripts/lib/links/ignores.ts
Lines 100 to 132 in c7bbfb1
They correspond to this RST:
https://github.com/Qiskit/qiskit/blob/d26d3069254a669a43991da73e161abd57f897d3/qiskit/utils/optionals.py#L28-L45
Which results in this markdown:
documentation/docs/api/qiskit/utils.md
Lines 329 to 336 in c7bbfb1
--
To avoid dealing with the table nuance, it may be easier to look at
qasm2.md
:documentation/scripts/lib/links/ignores.ts
Lines 95 to 97 in c7bbfb1
https://github.com/Qiskit/qiskit/blob/d26d3069254a669a43991da73e161abd57f897d3/qiskit/qasm2/__init__.py#L454-L470
documentation/docs/api/qiskit/qasm2.md
Lines 497 to 509 in c7bbfb1
--
We should be adding a
<span id="qiskit.utils.optionals.HAS_AER"></span>
for example.The text was updated successfully, but these errors were encountered: