3 from sphinx
.application
import Sphinx
9 def subst_gh_links(app
: Sphinx
, docname
, source
):
10 regex
= re
.compile("#GH([0-9]+)")
11 out_pattern
= r
"`#\1 <https://github.com/llvm/llvm-project/issues/\1>`_"
13 result
= regex
.sub(out_pattern
, result
)
17 def setup(app
: Sphinx
):
18 app
.connect("source-read", subst_gh_links
)
19 return dict(version
=__version__
, parallel_read_safe
=True, parallel_write_safe
=True)