gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-docs] branch master updated: guard against API change in new Sphi


From: gnunet
Subject: [taler-docs] branch master updated: guard against API change in new Sphinx version
Date: Mon, 14 Dec 2020 14:01:52 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository docs.

The following commit(s) were added to refs/heads/master by this push:
     new 1c03dae  guard against API change in new Sphinx version
1c03dae is described below

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

    guard against API change in new Sphinx version
---
 _exts/typescriptdomain.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/_exts/typescriptdomain.py b/_exts/typescriptdomain.py
index 6877764..f9af1b0 100644
--- 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)
 
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]