mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
autosummary: fix bug in autosummary_generate option handling
This commit is contained in:
parent
c495b2a735
commit
a581245f9d
@ -453,16 +453,18 @@ def autolink_role(typ, rawtext, etext, lineno, inliner,
|
|||||||
def process_generate_options(app):
|
def process_generate_options(app):
|
||||||
genfiles = app.config.autosummary_generate
|
genfiles = app.config.autosummary_generate
|
||||||
|
|
||||||
|
ext = app.config.source_suffix
|
||||||
|
|
||||||
if genfiles and not hasattr(genfiles, '__len__'):
|
if genfiles and not hasattr(genfiles, '__len__'):
|
||||||
env = app.environment
|
env = app.builder.env
|
||||||
genfiles = [env.doc2path(x) for x in env.found_docs]
|
genfiles = [x + ext for x in env.found_docs
|
||||||
|
if os.path.isfile(env.doc2path(x))]
|
||||||
|
|
||||||
if not genfiles:
|
if not genfiles:
|
||||||
return
|
return
|
||||||
|
|
||||||
from sphinx.ext.autosummary.generate import generate_autosummary_docs
|
from sphinx.ext.autosummary.generate import generate_autosummary_docs
|
||||||
|
|
||||||
ext = app.config.source_suffix
|
|
||||||
genfiles = [genfile + (not genfile.endswith(ext) and ext or '')
|
genfiles = [genfile + (not genfile.endswith(ext) and ext or '')
|
||||||
for genfile in genfiles]
|
for genfile in genfiles]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user