Qiskit / documentation

The documentation content home for https://docs.quantum.ibm.com.
https://docs.quantum.ibm.com
Apache License 2.0
39 stars 80 forks source link

Broken link for inlined classes in addon docs #2210

Closed Eric-Arellano closed 3 weeks ago

Eric-Arellano commented 3 weeks ago

https://github.com/Qiskit/documentation/blob/8b17877094259e36dff221c919781ce38fa9d636/scripts/js/lib/links/ignores.ts#L335-L342

The issue is that the header for methods doesn't repeat the class name. The anchor is p_norm, not TransactionBudget.p_norm. Note the original Sphinx is set to qiskit_addon_obp.utils.truncating.TruncationErrorBudget.p_norm, which we do preserve via the MDX component's ID.

This happens because:

https://github.com/Qiskit/documentation/blob/8b17877094259e36dff221c919781ce38fa9d636/scripts/js/lib/api/updateLinks.ts#L95-L99

Three ways to fix this:

  1. Add a span to the heading with the id set to what's expected
  2. Have updateLinks.ts realize it's an inlined class and remove the class
  3. Don't have updateLinks.ts remove the prefix qiskit_addon_obp.utils.truncating.. Ensure the link checker correctly loads id="qiskit_addon_obp.utils.truncating.TruncationErrorBudget.p_norm" from the <Function> component.