Issue #199 resolved

rest comments shown in output

created an issue

I have rest comments at the top of my index.txt file. In previous versions of sphinx these comments were not displayed in the resulting output. (As is expected)

After upgrading to 0.6.1 these comments are now improperly being displayed in the resulting html output. Using utf-8 encoding.

I've tried making a single-line and multi-line comments, but neither seem to work

sample index.txt file:

<top of the file> .. this comment is displayed in the resulting html output.

Welcome to the Documentation

.. toctree::


.. a comment here is ok, and not displayed <bottom of the file>

Using the comment creation as defined here:

Comments (5)

  1. monkut reporter

    hmmm... just removed the comments, and then my initial header line wasn't being detected, and displayed as text. I have a feeling this may be some kind of encoding issue, but I'm 99% sure I'm encoding the files as utf-8. Putting 4 lines of space from the top of the file to the section header gets the header (and comments? may be haven't tried yet.) to display properly.

    index title

  2. Georg Brandl repo owner
    • changed status to open

    Could you try setting

    source_encoding = 'utf-8-sig'

    in your If that helps, your files are saved with a coding cookie, which upsets the reST parser. From 0.6.2 on, that encoding will be default anyway.

  3. Log in to comment