homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: sphinx.ext.autodoc fails to expand tabs in docstrings
Type: behavior Stage:
Components: Documentation tools (Sphinx) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, jmillikin
Priority: normal Keywords:

Created on 2008年04月04日 04:29 by jmillikin, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (2)
msg64912 - (view) Author: John Millikin (jmillikin) Date: 2008年04月04日 04:29
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(), '']
msg64991 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008年04月05日 17:28
Thank you, fixed in r62171.
History
Date User Action Args
2022年04月11日 14:56:33adminsetgithub: 46797
2008年04月05日 17:28:57georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg64991
2008年04月04日 04:29:29jmillikinsettype: behavior
2008年04月04日 04:29:10jmillikincreate

AltStyle によって変換されたページ (->オリジナル) /