Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix syntax highlight #6128

Merged
merged 1 commit into from
Aug 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/source/extending/savehooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ two hooks available:
without content. This could be used to commit changes after every save, for
instance.

They are both called with keyword arguments::
They are both called with keyword arguments:

.. code-block:: python

pre_save_hook(model=model, path=path, contents_manager=cm)
post_save_hook(model=model, os_path=os_path, contents_manager=cm)
Expand All @@ -21,7 +23,9 @@ Examples

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

A pre-save hook for stripping output::
A pre-save hook for stripping output:

.. code-block:: python

def scrub_output_pre_save(model, **kwargs):
"""scrub output before saving notebooks"""
Expand Down