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: Only add external version warning nodes on documents #114
Conversation
@humitos We had something similar, but not quite the same as yours. (I'm working on the same project as @ItsAleph) |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks.
I'm requesting review from another developer as well, just to have some extra eyes as backup :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From sphinx's typehints, it's said that these are documents
so, this might be a sphinx bug... I'll see if I can replicate with other versions of sphinx.
Ok, so from sphinx-doc/sphinx#3796 and some extensions https://github.com/search?q=org%3Asphinx-contrib+resolve_references&type=code. Sphinx always does use |
Co-authored-by: Santos Gallegos <stsewd@proton.me>
Co-authored-by: Santos Gallegos <stsewd@proton.me>
Co-authored-by: Santos Gallegos <stsewd@proton.me>
For some reaosn, Sphinx emits
doctree-resolved
not only for documents (in our case it was emitted withdocutils.nodes.bullet_list
asdoctree
), which causes external version warning to appear in unexpected places (sidebar in our case). This PR adds simpleisinstance()
check which ensures thatdoctree
issphinx.addnodes.document
, eliminating the above issue.Resolves #113