From 50589f3343565c2ed65b7b923791c1a16813a338 Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Fri, 20 Nov 2015 16:38:40 +0100 Subject: [PATCH] autohelp: avoid help strings on multiple lines Multiple lines means dealing with indentation, which is complicated and not a problem for automatically generated tables. Use the same helptext generation in autohelp than in extract_swift_flags. Change-Id: Ibd64d3f0387c3e7f1f3aacf57be5f0c97addf5c9 --- autogenerate_config_docs/autohelp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autogenerate_config_docs/autohelp.py b/autogenerate_config_docs/autohelp.py index 282ebb40..fbbb8a44 100755 --- a/autogenerate_config_docs/autohelp.py +++ b/autogenerate_config_docs/autohelp.py @@ -397,9 +397,11 @@ def write_files(package_name, options, target, output_format): if not option.help: option.help = "No help text available for this option." + helptext = option.help.strip().replace('\n', ' ') + helptext = ' '.join(helptext.split()) item = (option.dest, _sanitize_default(option), - "(%s) %s" % (type(option).__name__, option.help.strip())) + "(%s) %s" % (type(option).__name__, helptext)) items.append(item) env['items'].append(items)