From 79e9a13e783ee5c10878ac44fbe2d58f540bfd45 Mon Sep 17 00:00:00 2001 From: Karel De Brabandere Date: Wed, 10 Aug 2016 00:14:34 +0200 Subject: [PATCH] check all source_suffix extensions before adding the first so that autosummary doesn't fail for multiple source_suffix values, fix #2485 --- sphinx/ext/autosummary/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py index 3635ad07f..a539f6c9b 100644 --- a/sphinx/ext/autosummary/__init__.py +++ b/sphinx/ext/autosummary/__init__.py @@ -555,12 +555,12 @@ def process_generate_options(app): from sphinx.ext.autosummary.generate import generate_autosummary_docs - ext = app.config.source_suffix[0] - genfiles = [genfile + (not genfile.endswith(ext) and ext or '') + ext = app.config.source_suffix + genfiles = [genfile + (not genfile.endswith(tuple(ext)) and ext[0] or '') for genfile in genfiles] generate_autosummary_docs(genfiles, builder=app.builder, - warn=app.warn, info=app.info, suffix=ext, + warn=app.warn, info=app.info, suffix=ext[0], base_path=app.srcdir)