Permalink
Browse files

don't include print __doc__ in example

  • Loading branch information...
1 parent c3b41b1 commit 59ea70bdfd6017d14e91505938d5aa92fb069587 @ndawe ndawe committed Oct 14, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 docs/sphinxext/gen_rst.py
@@ -117,7 +117,10 @@ def extract_docstring(filename):
if len(paragraphs) > 0:
first_par = paragraphs[0]
break
- return docstring, first_par, erow + 1 + start_row
+ end_row = erow + 1 + start_row
+ if lines and lines[end_row - 2] == 'print __doc__\n':
+ end_row += 1
+ return docstring, first_par, end_row
def generate_example_rst(app):

0 comments on commit 59ea70b

Please sign in to comment.