We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02e5f3a commit 80ac07eCopy full SHA for 80ac07e
docs/source/developers/savehooks.rst
@@ -82,3 +82,15 @@ A post-save hook to make a script equivalent whenever the notebook is saved
82
83
This could be a simple call to ``jupyter nbconvert --to script``, but spawning
84
the subprocess every time is quite slow.
85
+
86
+.. note::
87
+ Assigning a new hook to e.g. ``c.FileContentsManager.pre_save_hook`` will override any existing one.
88
89
+If you want to add new hooks and keep existing ones, you should use e.g.:
90
91
+.. code-block:: python
92
93
+ contents_manager.register_pre_save_hook(script_pre_save)
94
+ contents_manager.register_post_save_hook(script_post_save)
95
96
+Hooks will then be called in the order they were registered.
0 commit comments