Skip to content

Commit 9094b4f

Browse files
committed
[toc2] use full URL for links, cf #1023
1 parent b0937b8 commit 9094b4f

File tree

1 file changed

+2
-1
lines changed
  • src/jupyter_contrib_nbextensions/nbextensions/toc2

1 file changed

+2
-1
lines changed

src/jupyter_contrib_nbextensions/nbextensions/toc2/toc2.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ function removeMathJaxPreview(elt) {
2323

2424
var make_link = function(h, num_lbl) {
2525
var a = $("<a/>");
26-
a.attr("href", '#' + h.attr('id'));
26+
a.attr("href", window.location.origin + window.location.pathname + '#' + h.attr('id'));
27+
// a.attr("href", h.find('.anchor-link').attr('href'));
2728
// get the text *excluding* the link text, whatever it may be
2829
var hclone = h.clone();
2930
hclone = removeMathJaxPreview(hclone);

0 commit comments

Comments
 (0)