Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/flang
diff options
context:
space:
mode:
authorRichard Barton <richard.barton@arm.com>2020-09-16 10:18:08 +0300
committerHans Wennborg <hans@chromium.org>2020-09-16 11:49:14 +0300
commit8f2c29681ce768afb739b6cf5ccca81dd87d5326 (patch)
treed4754d799a4538116a1f30d28854186591fc369c /flang
parent158581772fc8f3d6c601ceba14a08285e46cb7e9 (diff)
[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)
Diffstat (limited to 'flang')
-rw-r--r--flang/docs/conf.py11
1 files changed, 11 insertions, 0 deletions
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 @@ else:
# 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