New submission from John Millikin <[EMAIL PROTECTED]>:
Sphinx seems to need tabs expanded in reST, but the autodoc extension
doesn't do so. The following patch is very small, and fixes the issue on
my system.
Oddly, I can reproduce this on a Linux system with doctools and docutils
trunk, but not on a Mac with doctools and docutils trunk vOv.
Index: ext/autodoc.py
===================================================================
--- ext/autodoc.py (revision 62140)
+++ ext/autodoc.py (working copy)
@@ -41,7 +41,8 @@
"""
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(), '']
----------
assignee: georg.brandl
components: Documentation tools (Sphinx)
messages: 64912
nosy: georg.brandl, jmillikin
severity: normal
status: open
title: sphinx.ext.autodoc fails to expand tabs in docstrings
versions: Python 2.5
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2545>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com