Skip to content

Commit

Permalink
[toc2] relative links in "toc2 cell"
Browse files Browse the repository at this point in the history
fix for #1083. Revert full url in links to relative to the current page.
  • Loading branch information
jfbercher authored Sep 9, 2017
1 parent 98abd76 commit ecf4f3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jupyter_contrib_nbextensions/nbextensions/toc2/toc2.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function removeMathJaxPreview(elt) {
var make_link = function (h, toc_mod_id) {
var a = $('<a>')
.attr({
'href': window.location.href.split('#')[0] + h.find('.anchor-link').attr('href'),
'href': h.find('.anchor-link').attr('href'),
'data-toc-modified-id': toc_mod_id,
});
// get the text *excluding* the link text, whatever it may be
Expand Down

0 comments on commit ecf4f3d

Please sign in to comment.