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

Broken cross-ref links in various docs #7219

Closed
bryevdv opened this issue Sep 11, 2019 · 6 comments
Closed

Broken cross-ref links in various docs #7219

bryevdv opened this issue Sep 11, 2019 · 6 comments
Labels

Comments

@bryevdv
Copy link
Contributor

bryevdv commented Sep 11, 2019

Several package docs at https://azure.github.io/azure-sdk-for-python/ have cross-references to classes that do not render properly, e.g.:

Screen Shot 2019-09-11 at 2 20 07 PM

(This list is not exhaustive, just specific examples in different packages)

I made a small PR to fix this in keyvault: #7215 using explicit directives:

:class:`~foo.Bar`

etc. But noted that although things work with this change, the rendered appearance is also different from the "implicitly" rendered cross reference links (I guess these are generated by sphinx-apidoc?) i.e.

Screen Shot 2019-09-11 at 2 25 10 PM

VS

Screen Shot 2019-09-11 at 2 24 25 PM

The second version is the version with explicit :class: (though without a leading tilde to shorten) and is apparently used already in some SDKs. I am not sure how else to fix this problem except to use explicit directives, and FWIW I have only ever used explicit directives in the past.

@bryevdv bryevdv added the Docs label Sep 11, 2019
@chlowell
Copy link
Member

chlowell commented Sep 11, 2019

My belief (may well be incorrect) is that tildes backticks control the rendered style. So in your penultimate screenshot, I infer the link was "~foo.Pipeline", and that "`~foo.Pipeline`" would have rendered with the same style as your final screenshot.

@bryevdv
Copy link
Contributor Author

bryevdv commented Sep 11, 2019

The tildes control whether the full dotted path is displayed or not. So

:class:`foo.bar.Baz`  ==> "foo.bar.Baz"

but 

:class:`~foo.bar.Baz` ==> "Baz"

The difference between the last two that I am specifically referring to is the "plain text" blue link (which is how the implicit cross refs seem to render everywhere) vs the "outlined" fixed width text link (which is how the explicit :class: version renders everywhere).

@chlowell
Copy link
Member

Sorry, I meant "backticks" when I wrote "tildes".

@bryevdv
Copy link
Contributor Author

bryevdv commented Sep 11, 2019

Oh, no adding just backticks without the :class: in front just renderers the same broken link text, only italicized (I tried, just as an experiment). Also, most of the working implicit cross ref links don't have backticks at all

@bryevdv
Copy link
Contributor Author

bryevdv commented Sep 11, 2019

Also, AFAIK, single backticks don't actually do much useful, so I have been surprised to see them so much. If you want fixed-width <pre> kind of text, that takes double backticks:

backquotes: ``text`` for code samples.

@xiangyan99
Copy link
Member

Looks like it is fixed.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants