Thanks a lot! Solution 2 seems the best!

Mathieu

Le mardi 3 février 2015 11:54:43 UTC+1, Takayuki SHIMIZUKAWA a écrit :
>
> Hi,
>
> Indentation needed for literal block.
>
> http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#literal-blocks
>
> Or, remove literal block marker "::" to be parsed python console text as a 
> doctest block.
>
> http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#doctest-blocks
>
> For example:
> ```
> BlaBla::                       <- starting literal block by "::"
>
> >>> x = 1                    <- literal block is finished because this 
> line was not indented. starting doctest block
> >>> 'blabla'                <- continuing  doctest block
> 'blabla'                        <- doctest block is finished. This is a 
> new paragraph line.
> >>> y = 2                    <- new doctest block.
>
> following text              <- new paragraph
> ```
>
> Solution1:
> ```
> BlaBla::                       <- "::" literal block marker
>
>    >>> x = 1                 <- indented: literal block content
>    >>> 'blabla'             <- indented: literal block content
>    'blabla'                     <- indented: literal block content
>    >>> y = 2                 <- indented: literal block content
>
> following text
> ```
>
> Solution2:
> ```
> BlaBla:                        <-  not "::"
>
> >>> x = 1                    <- doctest block
> >>> 'blabla'                <- doctest block
> 'blabla'                       <- doctest block
> >>> y = 2                    <- doctest block
>
> following text
> ```
>
> Regards.
>
> On Tue Feb 03 2015 at 19:25:15 'Mathieu Dubois' via sphinx-users <
> [email protected] <javascript:>> wrote:
>
>> Just to add that the generated doc can be fund here 
>> <http://nipy.org/nipype/interfaces/generated/nipype.interfaces.fsl.preprocess.html#id8>.
>>  
>> One can clearly see that the end of the docstring is badly formatted.
>>
>> Le mardi 3 février 2015 11:08:14 UTC+1, Mathieu Dubois a écrit :
>>
>>> Hi,
>>>
>>> I'm new to sphinx and trying to improve nipype 
>>> <http://nipy.sourceforge.net/nipype/index.html> doc.
>>>
>>> I have noticed that some documents contains "Inconsistent literal block 
>>> quoting" errors. Those documents are generated from python files (from 
>>> docstrings). The offending python file is here 
>>> <https://github.com/nipy/nipype/blob/master/nipype/interfaces/fsl/preprocess.py>
>>>  
>>> (lines 1268, 1283 and 1298).
>>>
>>> Skipping the doctest seems to solve the problem but is not satisfying. 
>>> Due to my lack of knowledge in sphinx I haven't found any other solution.
>>>
>>> Can anybody suggest a way to fix sphinx error without skipping the 
>>> doctest?
>>>
>>> Thanks in advance,
>>> Mathieu
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sphinx-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/sphinx-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to