This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients BreamoreBoy, bethard, chris.jerdonek, paul.j3, roysmith
Date 2014-07-17.20:55:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405630543.64.0.233950300844.issue17113@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2014-07-17 20:55:43paul.j3setrecipients: + paul.j3, roysmith, bethard, chris.jerdonek, BreamoreBoy
2014-07-17 20:55:43paul.j3setmessageid: <1405630543.64.0.233950300844.issue17113@psf.upfronthosting.co.za>
2014-07-17 20:55:43paul.j3linkissue17113 messages
2014-07-17 20:55:43paul.j3create