summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-03-01 13:00:15 +0100
committerFlorian Dold <florian@dold.me>2021-03-01 13:00:15 +0100
commitf4f1fa0e17b95270d244a950b4b938419dc52029 (patch)
tree6041deecf9643fd8f1f64c342334c8cf97d1d84a
parent1ede8a2be9dda22c9cd9d4086df2dc8481f70fab (diff)
downloaddocs-f4f1fa0e17b95270d244a950b4b938419dc52029.tar.gz
docs-f4f1fa0e17b95270d244a950b4b938419dc52029.tar.bz2
docs-f4f1fa0e17b95270d244a950b4b938419dc52029.zip
fix typescript links (closes https://bugs.taler.net/n/6732)
-rw-r--r--_exts/typescriptdomain.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/_exts/typescriptdomain.py b/_exts/typescriptdomain.py
index 83ab26c6..ac6e4b89 100644
--- a/_exts/typescriptdomain.py
+++ b/_exts/typescriptdomain.py
@@ -420,6 +420,7 @@ class LinkingHtmlFormatter(HtmlFormatter):
+ "#"
+ r1[1]
)
+ print(f"relative URL from {self._bridge.docname} to {r1[0]} is {rel_uri}")
return (
'<a style="color:inherit;text-decoration:underline" href="%s">%s</a>'
% (rel_uri, content)
@@ -521,7 +522,7 @@ class MyPygmentsBridge(PygmentsBridge):
elif isinstance(location, Element):
self.line = location.line
self.path = location.source
- self.docname = Path(location.source).stem
+ self.docname = self.builder.env.path2doc(self.path)
return super().highlight_block(source, lang, opts, force, location, **kwargs)