[Epydoc-commits] SF.net SVN: epydoc: [1379] trunk/epydoc/src/epydoc/docparser.py
Brought to you by:
edloper
From: <dva...@us...> - 2006-09-10 16:24:00
|
Revision: 1379 http://svn.sourceforge.net/epydoc/?rev=1379&view=rev Author: dvarrazzo Date: 2006-09-10 09:23:49 -0700 (Sun, 10 Sep 2006) Log Message: ----------- - Don't strip empty lines from documentation comment blocks. Without the patch, a block such:: #: frobnication factor #: #: :type: ``int`` is transformed in the string:: frobnication factor :type: ``int`` that is a docstring error (the field is not recognized). Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2006-09-10 15:16:41 UTC (rev 1378) +++ trunk/epydoc/src/epydoc/docparser.py 2006-09-10 16:23:49 UTC (rev 1379) @@ -157,7 +157,7 @@ """ #{ Configuration Constants: Comment docstrings -COMMENT_DOCSTRING_MARKER = '#: ' +COMMENT_DOCSTRING_MARKER = '#:' """The prefix used to mark comments that contain attribute docstrings for variables.""" @@ -577,6 +577,8 @@ elif toktype == tokenize.COMMENT: if toktext.startswith(COMMENT_DOCSTRING_MARKER): comment_line = toktext[len(COMMENT_DOCSTRING_MARKER):].rstrip() + if comment_line.startswith(" "): + comment_line = comment_line[1:] comments.append( [comment_line, srow]) elif toktext.startswith(START_GROUP_MARKER): start_group = toktext[len(START_GROUP_MARKER):].strip() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |