taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit 1c03dae120dc47a3652b7d18a7d51511d2bf383e
parent cf29c27e4b3155a41106316d91f5497a068b7856
Author: Florian Dold <florian@dold.me>
Date:   Mon, 14 Dec 2020 14:01:47 +0100

guard against API change in new Sphinx version

Diffstat:
M_exts/typescriptdomain.py | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/_exts/typescriptdomain.py b/_exts/typescriptdomain.py @@ -405,6 +405,8 @@ class LinkingHtmlFormatter(HtmlFormatter): ): return value + if self._bridge.docname is None: + return value if xref is None: return value content = caption if caption is not None else value @@ -509,10 +511,11 @@ class MyPygmentsBridge(PygmentsBridge): def highlight_block( self, source, lang, opts=None, force=False, location=None, **kwargs ): - docname, line = location - self.line = line - self.path = self.builder.env.doc2path(docname) - self.docname = docname + if isinstance(location, tuple): + docname, line = location + self.line = line + self.path = self.builder.env.doc2path(docname) + self.docname = docname return super().highlight_block(source, lang, opts, force, location, **kwargs)