summaryrefslogtreecommitdiff
path: root/_exts/tsref.py
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-29 16:31:24 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-29 16:31:24 +0200
commit765c9ac3080360900945da4a3c5f2213933ae3a3 (patch)
tree1fee3c9547b905c8a0f80c1a4b89edb305f273fc /_exts/tsref.py
parentf5ac4b1b15e59271581299123439e68d0943e8fe (diff)
downloaddocs-765c9ac3080360900945da4a3c5f2213933ae3a3.tar.gz
docs-765c9ac3080360900945da4a3c5f2213933ae3a3.tar.bz2
docs-765c9ac3080360900945da4a3c5f2213933ae3a3.zip
fix typescript links in non-root docs
Diffstat (limited to '_exts/tsref.py')
-rw-r--r--_exts/tsref.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/_exts/tsref.py b/_exts/tsref.py
index ae108324..ae0e924b 100644
--- a/_exts/tsref.py
+++ b/_exts/tsref.py
@@ -171,8 +171,10 @@ class LinkFilter(Filter):
defname = make_id('tsref-type-' + value);
t = copy_token(ttype)
if defname in id_to_doc:
+ current_docname = self.app.builder._current_docname
docname = id_to_doc[defname]
- href = self.app.builder.get_target_uri(docname) + "#" + defname
+ uri = self.app.builder.get_relative_uri(current_docname, docname)
+ href = uri + "#" + defname
tok_setprop(t, "href", href)
yield t, value