diff --git a/docs/handbook/writing-your-own-file-decoder.rst b/docs/handbook/writing-your-own-file-decoder.rst index 410bf4e7b..49b882c71 100644 --- a/docs/handbook/writing-your-own-file-decoder.rst +++ b/docs/handbook/writing-your-own-file-decoder.rst @@ -105,7 +105,9 @@ Note that the image plugin must be explicitly registered using :py:func:`PIL.Image.register_open`. Although not required, it is also a good idea to register any extensions used by this format. -Once the plugin has been imported, it can be used:: +Once the plugin has been imported, it can be used: + +.. code-block:: python from PIL import Image import SpamImagePlugin @@ -423,4 +425,3 @@ Python-based file decoder: 3. Cleanup: The decoder instance's ``cleanup`` method is called. -