-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Make toctree accept special docnames #10673
Conversation
The PR works when building a project, but there's obviously still something missing. I'll need to look into the failing tests... |
8497ffc
to
e6bf886
Compare
I have some questions on how to continue with this:
|
sphinx/directives/other.py
Outdated
@@ -118,7 +119,7 @@ def parse_content(self, toctree: addnodes.toctree) -> List[Node]: | |||
docname = docname_join(self.env.docname, docname) | |||
if url_re.match(ref) or ref == 'self': | |||
toctree['entries'].append((title, ref)) | |||
elif docname not in self.env.found_docs: | |||
elif docname not in (self.env.found_docs | generated_documents): |
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.
It would be better to move this union computation out of the loop here
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.
Fixed
Is there anything I can do at this point? Thanks! |
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.
Please add an entry to CHANGES.
A
Add A |
669984b
to
af1570b
Compare
45fdf73
to
af1570b
Compare
af1570b
to
34d8f16
Compare
Looks good, I updated the implementation so as not to hard-code the "special" in more places. The only open question is the glob behaviour (see linked issue). A |
Thanks @brechtm! A |
Many thanks, @AA-Turner, for bringing this to completion! |
Subject: Make toctree accept 'genindex', 'modindex' and 'search' docnames
Feature or Bugfix
Bugfix
Relates
Fixes #8438