File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -111,17 +111,20 @@ def parse_content(self, toctree: addnodes.toctree) -> None:
111
111
url_match = url_re .match (entry ) is not None
112
112
if glob and glob_re .match (entry ) and not explicit and not url_match :
113
113
pat_name = docname_join (current_docname , entry )
114
- doc_names = sorted (patfilter (all_docnames , pat_name ))
114
+ doc_names = sorted (
115
+ docname for docname in patfilter (all_docnames , pat_name )
116
+ # don't include generated documents in globs
117
+ if docname not in generated_docnames
118
+ )
119
+ if not doc_names :
120
+ logger .warning (
121
+ __ ("toctree glob pattern %r didn't match any documents" ),
122
+ entry , location = toctree )
123
+
115
124
for docname in doc_names :
116
- if docname in generated_docnames :
117
- # don't include generated documents in globs
118
- continue
119
125
all_docnames .remove (docname ) # don't include it again
120
126
toctree ['entries' ].append ((None , docname ))
121
127
toctree ['includefiles' ].append (docname )
122
- if not doc_names :
123
- logger .warning (__ ("toctree glob pattern %r didn't match any documents" ),
124
- entry , location = toctree )
125
128
continue
126
129
127
130
if explicit :
You can’t perform that action at this time.
0 commit comments