Skip to content

Commit

Permalink
Merge pull request #888 from juhasch/fix/codefolding
Browse files Browse the repository at this point in the history
handle notebook_loaded for codefolding
  • Loading branch information
jcb91 authored Feb 15, 2017
2 parents 8fc65ff + 1113805 commit e317a4b
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,15 @@ define([
load_css('codemirror/addon/fold/foldgutter.css');
/* change default gutter width */
load_css( './foldgutter.css');
/* require our additional custom codefolding modes before initialising
fully */
require(['./firstline-fold', './magic-fold'], initGutter);
/* require our additional custom codefolding modes before initialising fully */
if (Jupyter.notebook !== undefined && Jupyter.notebook._fully_loaded) {
require(['./firstline-fold', './magic-fold'], initGutter);
} else {
events.on("notebook_loaded.Notebook", function () {
require(['./firstline-fold', './magic-fold'], initGutter);
})
}
};

$([IPython.events]).on("notebook_loaded.Notebook", function(){
initGutter();
});

return {load_ipython_extension : load_extension};
});

0 comments on commit e317a4b

Please # to comment.