Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR
fixes hrefs for class parameters on ALL classes across ALL librares 🤗
Problem
Currently, hrefs for individual parameters are broken. Examples (try to click on individual parameters of the classes):
We can see in the pages' source code that the hrefs are sketchy
Diving deeper in the doc builder and in our docs, we can see that:
#
by their html equivalent on inline code blocksSolution
The
#
conversion exists to prevent bad formatting in some cases, so it can't simply be removed -- see #504The solution adopted consists in detecting inline code blocks inside the autodoc section, which contain the href anchor, and preserving the
#
there. The solution in the PR consists in reverting the conversion -- in my quick experiments, a complete regex that skipped the conversion in autodoc blocks was much much slower.Example of an href after these changes:
Same href in a previously working version:
Tests
I couldn't find a test section for the
kit
folder 🤔