[PATCH] D87714: [flang] Fix docs build

Richard Barton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 00:19:33 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGaf56be339f8c: [flang] Fix docs build (authored by richard.barton.arm).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87714/new/

https://reviews.llvm.org/D87714

Files:
  flang/docs/conf.py


Index: flang/docs/conf.py
===================================================================
--- flang/docs/conf.py
+++ 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87714.292124.patch
Type: text/x-patch
Size: 846 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200916/e795aaf4/attachment.bin>


More information about the llvm-commits mailing list