ReStructuredText newline character breaks blocks of code

Hi and thanks for looking at my problem! Therefore, I use reStructuredText and Sphinx to create a set of documents. Each page must comply with PEP8 and therefore must contain no more than 80 characters per line. This is a new requirement and breaks several pages.

When we used to have:

.. code-block:: bash
    really really long line of code that I would want a new user to copy and paste into a terminal

Now we have:

.. code-block:: bash
    really really long line of code that
    I would want a new user to copy and
    paste into a terminal

This is a problem, since each line is treated as a separate command when inserted into the terminal. Reading the documents, I see that I can do something like:

| really really long line of code that I 
  would want a new user to copy and paste
  into a terminal

so that my text fits in 1 line, but this does not allow me to highlight the block style or syntax highlighting that I want. Does anyone know how to achieve what I'm looking for? Thank you in advance for your feedback and feedback!

+4
1

, , . .

.. code-block:: bash

   really really long line of code that \
   I would want a new user to copy and \
   paste into a terminal

.

. http://www.gnu.org/software/bash/manual/bashref.html#Escape-Character.

+4

All Articles