On 1/21/12 1:14 PM, John H Palmieri wrote:


On Saturday, January 21, 2012 8:28:35 AM UTC-8, jason wrote:

    I'm trying to track down this error:

    
/Users/grout/sage-trees/sage-5.0.prealpha1/devel/sagenb-git/sagenb/notebook/cell.py:docstring

    of sagenb.notebook.cell.Cell:4: WARNING: Block quote ends without a
    blank line; unexpected unindent.
    
/Users/grout/sage-trees/sage-5.0.prealpha1/devel/sagenb-git/sagenb/notebook/cell.py:docstring

    of sagenb.notebook.cell.Cell:14: ERROR: Unexpected indentation.


    Everything in that classes __init__ function is formatted properly.
    When I add or remove lines, I can get the line numbers in the error
    message to change. I just can't find the errors anywhere, though.


The __init__ function shouldn't even by processed by Sphinx: Sphinx
ignores all methods starting with an underscore. So the problem is
somewhere else. I'll take a look and post to #11080. (If all else fails,
delete half of the file and build the documentation. If the error is
still there, delete half of what's left, etc.)

It turns out that the error is indeed in a completely different function. One of the functions has a docstring that has this line:

sage: W.edit_save('foo\n{{{\n2+3\n///\n5\n}}}bar\n{{{\n2+8\n///\n10\n}}}')

However, since the docstring is not a raw string, the \n in there get interpreted as newlines in the docstring, so they cause linebreaks in the generated rst. The solution is to make the entire docstring a raw string.

Thanks,

Jason

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to