[llvm-branch-commits] [flang] 8f2c296 - [flang] Fix docs build
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Sep 16 01:49:29 PDT 2020
Author: Richard Barton
Date: 2020-09-16T10:49:14+02:00
New Revision: 8f2c29681ce768afb739b6cf5ccca81dd87d5326
URL: https://github.com/llvm/llvm-project/commit/8f2c29681ce768afb739b6cf5ccca81dd87d5326
DIFF: https://github.com/llvm/llvm-project/commit/8f2c29681ce768afb739b6cf5ccca81dd87d5326.diff
LOG: [flang] Fix docs build
Apply a local fix to an issue with recommonmark's AutoStructify extension
when used with certain versions of sphinx.
See https://github.com/readthedocs/recommonmark/issues/93
Reviewed By: hans
Differential Revision: https://reviews.llvm.org/D87714
(cherry picked from commit af56be339f8c9660747794cc6755384154602535)
Added:
Modified:
flang/docs/conf.py
Removed:
################################################################################
diff --git a/flang/docs/conf.py b/flang/docs/conf.py
index 21362fc3449e..f5eb283a186a 100644
--- a/flang/docs/conf.py
+++ b/flang/docs/conf.py
@@ -50,6 +50,17 @@
# Setup AutoStructify for inline .rst toctrees in index.md
from recommonmark.transform import AutoStructify
+
+ # Stolen from https://github.com/readthedocs/recommonmark/issues/93
+ # Monkey patch to fix recommonmark 0.4 doc reference issues.
+ from recommonmark.states import DummyStateMachine
+ orig_run_role = DummyStateMachine.run_role
+ def run_role(self, name, options=None, content=None):
+ if name == 'doc':
+ name = 'any'
+ return orig_run_role(self, name, options, content)
+ DummyStateMachine.run_role = run_role
+
def setup(app):
# Disable inline math to avoid
# https://github.com/readthedocs/recommonmark/issues/120 in Extensions.md
More information about the llvm-branch-commits
mailing list