commit f4f1fa0e17b95270d244a950b4b938419dc52029
parent 1ede8a2be9dda22c9cd9d4086df2dc8481f70fab
Author: Florian Dold <florian@dold.me>
Date: Mon, 1 Mar 2021 13:00:15 +0100
fix typescript links (closes https://bugs.taler.net/n/6732)
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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)