gnunet-svn
[Top][All Lists]
Advanced

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

[taler-docs] 01/02: re-enable highlightling for newer Sphinx


From: gnunet
Subject: [taler-docs] 01/02: re-enable highlightling for newer Sphinx
Date: Mon, 14 Dec 2020 14:21:19 +0100

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

dold pushed a commit to branch master
in repository docs.

commit 51a5a7f9f82eae45a7a362118239f18bb0ce4f4e
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Dec 14 14:13:14 2020 +0100

    re-enable highlightling for newer Sphinx
---
 _exts/typescriptdomain.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/_exts/typescriptdomain.py b/_exts/typescriptdomain.py
index f9af1b0..0f08fff 100644
--- a/_exts/typescriptdomain.py
+++ b/_exts/typescriptdomain.py
@@ -8,6 +8,8 @@ TypeScript domain.
 
 import re
 
+from pathlib import Path
+
 from docutils import nodes
 from typing import List, Optional, Iterable, Dict, Tuple
 from typing import cast
@@ -516,6 +518,10 @@ class MyPygmentsBridge(PygmentsBridge):
             self.line = line
             self.path = self.builder.env.doc2path(docname)
             self.docname = docname
+        elif isinstance(location, Element):
+            self.line = location.line
+            self.path = location.source
+            self.docname = Path(location.source).stem
         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]