Properly expand tabs in docstrings.

This commit is contained in:
Georg Brandl 2008-04-05 17:28:37 +00:00
parent a86b36b4ba
commit 4fb19d0aeb

View File

@ -41,7 +41,8 @@ def prepare_docstring(s):
"""
if not s or s.isspace():
return ['']
nl = s.expandtabs().rstrip().find('\n')
s = s.expandtabs()
nl = s.rstrip().find('\n')
if nl == -1:
# Only one line...
return [s.strip(), '']