mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Properly expand tabs in docstrings.
This commit is contained in:
parent
a86b36b4ba
commit
4fb19d0aeb
@ -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(), '']
|
||||
|
Loading…
Reference in New Issue
Block a user