On 2011-08-29, Infinity77 wrote: > However, now I am getting this kind of errors:
> E:\AGW\agw\aui\auibook.py:docstring of > aui.auibook.AuiNotebook.DeletePage:6: (ERROR/3) Error in "note" > directive: > invalid option block. > Which is fantastically wrong as the "note" directive is perfectly > valid: >:note: L{DeletePage} removes a tab from the multi-notebook, and > destroys the window as well. > I pre-process the docstrings using this approach: > def setup(app): > app.connect('autodoc-process-docstring', mangle_docstrings) > In which I replace the L{something} with an appropriate ReST link and > I replace the ":note:" attribute with ".. note::" (I have to do this > because of backward compatibility with epydoc). > Now, I am not sure what has changed in Sphinx to make this happen, but > I welcome any suggestion in order to fix this issue (I have many more > errors related to ".. note::", ".. warning::" and friends. Did you update the Docutils, too? Release 0.8 (2011-07-07) introduced: - Most directives now support a "name" option that attaches a reference name. - Directive content may start on the first line also when the directive type accepts options. However, in order to distinguish between a directive block and the directive argument, you may not start a "field list" on the first line of a directive that accepts options:: ..note:: :this: is a field list :interpreted: as option block The Docutils 0.8 parser only checks for a colon starting a line, so that the following two examples fail as well: .. note:: :code:`a == b` test the equality :math:`a = b` .. note:: a role is :strong:` not an option`. Workarounds: Write the content in the content block (separated from the directive start by a blank line):: ..note:: :this: is a field list :interpreted: as field list because it is preceded by a blank line Use role suffix instead of prefix:: .. note:: `a == b`:code: test the equality :math:`a = b` Use different line breaks:: .. note:: a role is :strong:` not an option`. For your problem, you might try: replace the ":note:" attribute with ".. note::\n\n " (there might be problems with the indentation, though). Günter -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.