Skip to content

Commit 4642b86

Browse files
committed
Merge branch 'release/0.2.4'
2 parents 75754a2 + 322b092 commit 4642b86

File tree

7 files changed

+28
-13
lines changed

7 files changed

+28
-13
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
language: python
22
python:
33
- "2.7"
4-
- "3.3"
5-
- "3.4"
64
- "3.5"
75
- "3.6"
86
install:
@@ -11,4 +9,4 @@ install:
119

1210
script:
1311
- py.test
14-
- flake8 . --ignore=E501,E722,E741 --exclude=docs/conf.py
12+
- flake8 . --ignore=E501,E722,E741,W605 --exclude=docs/conf.py

docs/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Change log
33
**********
44

5+
0.2.4
6+
#####
7+
8+
* Various bug fixes and documentation updates.
9+
510
0.2.3
611
#####
712

docs/misc.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ The short synopsis is below:
2020
overflow: visible !important;
2121
}
2222
23+
Alternatively, you can create a `docutil.conf` file with the following contents::
24+
25+
[writers]
26+
option-limit=1
27+
2328

2429
Linking to action groups
2530
------------------------

docs/usage.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,5 @@ Other useful directives
9898
:noepilog: Do not parse the epilogue, which can be useful if it contains text that could be incorrectly parse as reStructuredText.
9999

100100
:nodescription: Do not parse the description, which can be useful if it contains text that could be incorrectly parse as reStructuredText.
101+
102+
:passparser: This can be used if you don't have a function that returns an argument parser, but rather adds commands to it (`:func:` is then that function).

setup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@ def getVersion():
2828
'Intended Audience :: Developers',
2929
'License :: OSI Approved :: MIT License',
3030
'Programming Language :: Python :: 2.7',
31-
'Programming Language :: Python :: 3.2',
32-
'Programming Language :: Python :: 3.3',
33-
'Programming Language :: Python :: 3.4',
3431
'Programming Language :: Python :: 3.5',
3532
'Programming Language :: Python :: 3.6',
33+
'Programming Language :: Python :: 3.7',
3634
'Topic :: Documentation :: Sphinx',
3735
'Topic :: Software Development :: Documentation'
3836
],

sphinxarg/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.2.3'
1+
__version__ = '0.2.4'

sphinxarg/ext.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def map_nested_definitions(nested_content):
4545
for _ in subitem[idx]:
4646
if isinstance(_, nodes.definition_list):
4747
subContent.append(_)
48-
definitions[term] = (classifier, subitem[idx].astext(), subContent)
48+
definitions[term] = (classifier, subitem[idx], subContent)
4949

5050
return definitions
5151

@@ -60,11 +60,18 @@ def renderList(l, markDownHelp, settings=None):
6060
from sphinxarg.markdown import parseMarkDownBlock
6161
return parseMarkDownBlock('\n\n'.join(l) + '\n')
6262
else:
63-
if settings is None:
64-
settings = OptionParser(components=(Parser,)).get_default_values()
65-
document = new_document(None, settings)
66-
Parser().parse('\n\n'.join(l) + '\n', document)
67-
return document.children
63+
all_children = []
64+
for element in l:
65+
if isinstance(element, str):
66+
if settings is None:
67+
settings = OptionParser(components=(Parser,)).get_default_values()
68+
document = new_document(None, settings)
69+
Parser().parse(element + '\n', document)
70+
all_children += document.children
71+
elif isinstance(element, nodes.definition):
72+
all_children += element
73+
74+
return all_children
6875

6976

7077
def print_action_groups(data, nested_content, markDownHelp=False, settings=None):

0 commit comments

Comments
 (0)