Skip to content

Commit dafadc5

Browse files
committed
Adapt template.html to upstream nbviewer.js
1 parent ce3fb95 commit dafadc5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ipynb-quicklook/template.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
<script type='application/javascript'>
2424
var doc = document.getElementById('doc');
2525
var nb = %notebook-json%;
26+
if (!window.marked || !window.Prism || !window.katex) {
27+
throw new Error('expecting libraries marked.js, Prism.js and KaTeX to be present');
28+
}
29+
const nbv = nbv_constructor(document, {
30+
katex: window.katex,
31+
prism: window.Prism,
32+
marked: window.marked,
33+
});
2634
nbv.render(nb, doc);
2735
</script>
2836
</body>

0 commit comments

Comments
 (0)