summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-01-04 20:43:15 +0100
committerGeorg Brandl <georg@python.org>2009-01-04 20:43:15 +0100
commit04689accd072bc47aadecbd4db52af075477ff3b (patch)
tree150b237ac2093a6d17c04d71e7b8a8787c714d3d /sphinx/ext/autodoc.py
parent27bc4e31894a004f43b19ce10c24ff845fc6ec54 (diff)
downloadsphinx-git-04689accd072bc47aadecbd4db52af075477ff3b.tar.gz
Small API change.
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r--sphinx/ext/autodoc.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index 60ebd5b5e..35d96bda9 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -212,8 +212,9 @@ class RstGenerator(object):
docstrings.append(initdocstring)
# the default is only the class docstring
- # make sure we get Unicode docstrings
- return [force_decode(docstring, encoding) for docstring in docstrings]
+ # make sure we have Unicode docstrings, then sanitize and split into lines
+ return [prepare_docstring(force_decode(docstring, encoding))
+ for docstring in docstrings]
def process_doc(self, docstrings, what, name, obj):
"""Let the user process the docstrings."""
@@ -462,8 +463,7 @@ class RstGenerator(object):
# add content from docstrings
if not no_docstring:
encoding = analyzer and analyzer.encoding
- docstrings = map(prepare_docstring,
- self.get_doc(what, todoc, encoding))
+ docstrings = self.get_doc(what, todoc, encoding)
for i, line in enumerate(self.process_doc(docstrings, what,
fullname, todoc)):
self.result.append(indent + line, sourcename, i)