Skip to content

Commit b2c0789

Browse files
authored
Merge pull request #6128 from massongit/patch-1
Fix syntax highlight
2 parents 021f836 + 326821b commit b2c0789

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/source/extending/savehooks.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ two hooks available:
1111
without content. This could be used to commit changes after every save, for
1212
instance.
1313

14-
They are both called with keyword arguments::
14+
They are both called with keyword arguments:
15+
16+
.. code-block:: python
1517
1618
pre_save_hook(model=model, path=path, contents_manager=cm)
1719
post_save_hook(model=model, os_path=os_path, contents_manager=cm)
@@ -21,7 +23,9 @@ Examples
2123

2224
These can both be added to :file:`jupyter_notebook_config.py`.
2325

24-
A pre-save hook for stripping output::
26+
A pre-save hook for stripping output:
27+
28+
.. code-block:: python
2529
2630
def scrub_output_pre_save(model, **kwargs):
2731
"""scrub output before saving notebooks"""

0 commit comments

Comments
 (0)