Hi Takayuki,

you wrote that you added that newline, and my first tests confirmed
it... but in another doctree I had the problem again and then saw that
this additional newline is still missing. The problem comes when
`modulefirst` is True and the `__init__.py` file has no docstring. I
don't know what went wrong there, but here is again a patch, against the
newest version.

Luc


On 05/05/14 06:32, Takayuki Shimizukawa wrote:
> Hi,
> 
> Thanks for your propose.
> The pull request #236 and suggested append-newline code has been
> merged into 'default' branch.
> 
> Thanks!
> --
> Takayuki SHIMIZUKAWA
> http://about.me/shimizukawa
> 
> 
> 2014-04-23 15:56 GMT+09:00 Luc Saffre <[email protected]>:
>> On 20/04/14 03:12, Wes Turner wrote:
>>>
>>> Pull
>>> Request: 
>>> https://bitbucket.org/birkenfeld/sphinx/pull-request/236/1456-apidoc-add-a-m-option-to-put-module/diff
>>>
>>
>> Wes, here is a little bugfix. Add an additional empty line after the
>> automodule directive. Otherwise packages with empty docstring caused a
>> syntax error.
>>
>> Luc
>>
>> $ hg diff sphinx/apidoc.py
>> diff -r c171d4eef221 sphinx/apidoc.py
>> --- a/sphinx/apidoc.py  Sat Apr 19 19:08:41 2014 -0500
>> +++ b/sphinx/apidoc.py  Wed Apr 23 09:51:40 2014 +0300
>> @@ -98,6 +98,7 @@
>>
>>      if opts.modulefirst:
>>          text += format_directive(subroot, master_package)
>> +        text += '\n'
>>
>>      # build a list of directories that are szvpackages (contain an
>> INITPY file)
>>      subs = [sub for sub in subs if path.isfile(path.join(root, sub,
>> INITPY))]
>>
>>
>> --
>> 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.
> 

-- 
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.
diff -r 93de9df3e46d sphinx/apidoc.py
--- a/sphinx/apidoc.py	Mon May 05 12:15:41 2014 +0900
+++ b/sphinx/apidoc.py	Thu May 08 09:31:31 2014 +0300
@@ -98,6 +98,7 @@
 
     if opts.modulefirst:
         text += format_directive(subroot, master_package)
+        text += '\n'
 
     # build a list of directories that are szvpackages (contain an INITPY file)
     subs = [sub for sub in subs if path.isfile(path.join(root, sub, INITPY))]

Reply via email to