Skip to content

Commit af8896d

Browse files
committed
Fix of toc_extend_page.
1 parent d569f75 commit af8896d

File tree

3 files changed

+1963
-2
lines changed

3 files changed

+1963
-2
lines changed

demo.html

Lines changed: 1241 additions & 0 deletions
Large diffs are not rendered by default.

demo.ipynb

Lines changed: 719 additions & 0 deletions
Large diffs are not rendered by default.

src/pretty_jupyter/templates/pj/static/pj.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ window.initializeTOC = function (tocDepth, tocCollapsed, tocSmoothScroll, tocExt
268268
return text.replace(/[.\\/?&!#<>"']/g, '').replace(/\s/g, '_');
269269
},
270270
ignoreSelector: ".toc-ignore",
271-
scrollTo: 0
271+
scrollTo: 0,
272+
extendPage: tocExtendPage
272273
};
273274

274275
options.smoothScroll = tocSmoothScroll;
@@ -277,7 +278,7 @@ window.initializeTOC = function (tocDepth, tocCollapsed, tocSmoothScroll, tocExt
277278
var toc = $("#TOC").tocify(options).data("toc-tocify");
278279

279280
if (!tocCollapsed) {
280-
toc.setOptions({ "showAndHideOnScroll": false, "showAndHide": false, "extendPage": tocExtendPage });
281+
toc.setOptions({ "showAndHideOnScroll": false, "showAndHide": false });
281282
$(".tocify-subheader").show();
282283
}
283284
}

0 commit comments

Comments
 (0)