diff options
author | Pauli Virtanen <pav@iki.fi> | 2009-03-17 19:27:30 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2009-03-17 19:27:30 +0000 |
commit | 06f432130137c06f4c3d754c37eb756f45619ad6 (patch) | |
tree | dc09cabe0d53cdcaf18d27339669bc3618b3b92c /doc/sphinxext | |
parent | 4d3cf3d11514342d8662012e6a7533ae8e81f53b (diff) | |
download | numpy-06f432130137c06f4c3d754c37eb756f45619ad6.tar.gz |
sphinxext: autosummary: ignore trailing material on each line
This allows one to add helpful comments to autosummary lines,
if one wants to do so eg. in module docstrings.
Diffstat (limited to 'doc/sphinxext')
-rw-r--r-- | doc/sphinxext/autosummary.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/sphinxext/autosummary.py b/doc/sphinxext/autosummary.py index d99f861ee..8cd08b778 100644 --- a/doc/sphinxext/autosummary.py +++ b/doc/sphinxext/autosummary.py @@ -129,7 +129,8 @@ def autosummary_directive(dirname, arguments, options, content, lineno, """ names = [] - names += [x.strip() for x in content if x.strip()] + names += [x.strip().split()[0] for x in content + if x.strip() and re.search(r'^[a-zA-Z_]', x.strip()[0])] table, warnings, real_names = get_autosummary(names, state, 'nosignatures' in options) |