Rst-preview of .. code-block:: c on Mac OS X 10.10.5 adds blank lines


#1

The rst-preview settings in the ~/.atom/config.cson file are

“rst-preview-pandoc”:
pandocOpts: “-frst -thtml --webtex”

I am using the latest version of ATOM and all installed packages are up to date.

rst-preview inserts an extra blank line between each line of text in the following code snippet

This works fine for me, no random blank lines:

.. code-block:: c

    typedef struct Body {
      ...
      void* bodyFunctionPointer(Body*); // update shape matrices
      int childCount;
      Joint** childJoints;
    }

    typedef struct Joint {
      void* jointFunctionPointer(Joint*); // updates influence coefficient
                                          // matrices, accelerations,
                                          // velocities, relative values across
                                          // joints, etc.
      Body* parentBody;
      Frame* parentFrame;

      Body* childBody;
      Frame* childFrame;
    }

producing

Previewing the same snippet on the latest version of Arch Linux or right here does not insert blank lines. If I modify the code to

This works fine for me, no random blank lines:

.. code-block:: c
   a
    typedef struct Body {
      ...
      void* bodyFunctionPointer(Body*); // update shape matrices
      int childCount;
      Joint** childJoints;
    }

    typedef struct Joint {
      void* jointFunctionPointer(Joint*); // updates influence coefficient
                                          // matrices, accelerations,
                                          // velocities, relative values across
                                          // joints, etc.
      Body* parentBody;
      Frame* parentFrame;

      Body* childBody;
      Frame* childFrame;
    }

no extra blank lines will be inserted into the displayed text and it will be displayed as expected. The inserted line, ’ a’, composed of exactly three spaces followed by one or more characters, will not be displayed.


#2

Are you using CRLF line endings on Windows? (Check the right-hand side of the status bar.) If so, click on the CRLF and switch to LF and see if it changes.


#3

I installed the latest version of pandoc and the problem went away.