Message223371
I suspect fixing this isn't going to be easy.
Extra lines are removed by the top most `formatter` function:
def format_help(self):
help = self._root_section.format_help()
if help:
help = self._long_break_matcher.sub('\n\n', help)
help = help.strip('\n') + '\n'
return help
RawDescriptionHelpFormatter on the other hand just changes one deeply embedded function:
def _fill_text(self, text, width, indent):
return ''.join(indent + line for line in text.splitlines(keepends=True))
That `format_help` function has no way of distinguishing between '\n' that were part of the raw text, and which were added while assembling the various parts.
It could be instructive to try this version of format_help and see just how many \n are being removed:
def format_help(self):
help = self._root_section.format_help()
return help |
|
Date |
User |
Action |
Args |
2014-07-17 20:55:43 | paul.j3 | set | recipients:
+ paul.j3, roysmith, bethard, chris.jerdonek, BreamoreBoy |
2014-07-17 20:55:43 | paul.j3 | set | messageid: <1405630543.64.0.233950300844.issue17113@psf.upfronthosting.co.za> |
2014-07-17 20:55:43 | paul.j3 | link | issue17113 messages |
2014-07-17 20:55:43 | paul.j3 | create | |
|