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.
2 parents 021f836 + 326821b commit b2c0789Copy full SHA for b2c0789
docs/source/extending/savehooks.rst
@@ -11,7 +11,9 @@ two hooks available:
11
without content. This could be used to commit changes after every save, for
12
instance.
13
14
-They are both called with keyword arguments::
+They are both called with keyword arguments:
15
+
16
+.. code-block:: python
17
18
pre_save_hook(model=model, path=path, contents_manager=cm)
19
post_save_hook(model=model, os_path=os_path, contents_manager=cm)
@@ -21,7 +23,9 @@ Examples
21
23
22
24
These can both be added to :file:`jupyter_notebook_config.py`.
25
-A pre-save hook for stripping output::
26
+A pre-save hook for stripping output:
27
28
29
30
def scrub_output_pre_save(model, **kwargs):
31
"""scrub output before saving notebooks"""
0 commit comments