Allow bulleted lists in config reference
This is very much a hack, but its really just to see if it is possible
to convert the bullet lists into text that renders correctly with rst.
This was tested with the nova-hyperv.rst:
f0607509e3/doc/config-reference/source/tables/nova-hyperv.rst
Change-Id: Iab063774f6732d52cd8e79f82ff0fc93bd6d306b
This commit is contained in:
parent
329e410bfd
commit
4f0433ffce
|
@ -459,8 +459,15 @@ 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 = option.help.strip()
|
||||
helptext = helptext.replace('\n\n', '$sentinal$')
|
||||
helptext = helptext.replace('\n*', '$sentinal$*')
|
||||
helptext = helptext.replace('\n', ' ')
|
||||
helptext = ' '.join(helptext.split())
|
||||
# TODO(johngarbutt) space matches only the current template :(
|
||||
helptext = helptext.replace('$sentinal$', '\n\n ')
|
||||
|
||||
if option.deprecated_for_removal:
|
||||
if not option.help.strip().startswith('DEPRECATED'):
|
||||
helptext = 'DEPRECATED: ' + helptext
|
||||
|
|
Loading…
Reference in New Issue