Issue 2545: sphinx.ext.autodoc fails to expand tabs in docstrings (original) (raw)

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 ['']