From 8f7825031f58148b9e6a2bd581c6e135ad49993b Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Sun, 20 Nov 2016 13:56:58 +0000 Subject: [PATCH] Fix highlighting of Python code blocks The configuration on RTD doesn't default to Python highlighting, it seems. http://jupyter-notebook.readthedocs.io/en/latest/comms.html --- docs/source/comms.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/source/comms.rst b/docs/source/comms.rst index a82e2a51b..af51030c4 100644 --- a/docs/source/comms.rst +++ b/docs/source/comms.rst @@ -36,7 +36,9 @@ This example shows a frontend comm target registered in a registry: comm.send({'foo': 0}); }); -Now that the frontend comm is registered, you can open the comm from the kernel:: +Now that the frontend comm is registered, you can open the comm from the kernel: + +.. code-block:: python from ipykernel.comm import Comm @@ -61,7 +63,7 @@ registered in the kernel. For instance, this may be done by code displaying output: it will register a target in the kernel, and then display output containing Javascript to connect to it. -:: +.. code-block:: python def target_func(comm, msg): # comm is the kernel Comm instance