Index: llvm/docs/conf.py =================================================================== --- llvm/docs/conf.py +++ llvm/docs/conf.py @@ -26,7 +26,14 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo', 'recommonmark'] +extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo'] + +import sphinx +if sphinx.version_info >= (3, 0): + # This requires 0.5 or later. + extensions.append('recommonmark') +else: + source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'} # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']