alex-rudakov / sphinx-argparse

Sphinx extension that automatically document argparse commands and options
MIT License
49 stars 40 forks source link

Problem with rendering headlines #104

Open hahahannes opened 5 years ago

hahahannes commented 5 years ago

Hi I am encountering a problem when I try to use a headline in my parser. I found out that it is working with sub parser but not with a normal parser. There the headline does not even get displayed. Instead a empty paragraph gets rendered.

Not working:

parser = argparse.ArgumentParser(epilog='''
Headline
---------
''')

Working:

parser = argparse.ArgumentParser()
sub = parser.add_subparsers()
sub_parser = sub.add_parser('test', epilog='''
Headline
---------
''')