Anonymous avatar Anonymous committed 1c0353d

Add note about blank lines in doctest blocks.

Comments (0)

Files changed (1)

doc/ext/doctest.rst

    recognizes it from the leading ``>>>``.  Also, no additional indentation is
    necessary, though it doesn't hurt.)
 
-   If this value is true, the above snippet is interpreted by the doctest
-   builder exactly like the following::
+   If this value is left at its default value, the above snippet is interpreted
+   by the doctest builder exactly like the following::
 
       Some documentation text.
 
-      .. doctest:: doctest_block
+      .. doctest::
 
          >>> print 1
          1
    This feature makes it easy for you to test doctests in docstrings included
    with the :mod:`~sphinx.ext.autodoc` extension without marking them up with a
    special directive.
+
+   Note though that you can't have blank lines in reST doctest blocks.  They
+   will be interpreted as one block ending and another one starting.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.