Exemple #1
0
 def _format_text(self, text):
     paragraphs = re.split('\n([ \t]*\n)+', text)
     paragraphs = [
         IndentedHelpFormatter._format_text(self, p.strip())
         for p in paragraphs
     ]
     return '\n'.join(paragraphs)  # each already ends in a newline
 def _format_text(self, text):
     __doc__ = IndentedHelpFormatter._format_text
     return "\n\n".join(
         t if len(t) == 0 or t[0].isspace()
         else IndentedHelpFormatter._format_text(self, t)
         for t in text.split("\n\n")
     )
Exemple #3
0
 def _format_text(self, text):
     paragraphs = text.split('\n\n')
     return '\n\n'.join(IndentedHelpFormatter._format_text(self, p) for p in paragraphs)
Exemple #4
0
 def _format_text(self, text):
     paragraphs = text.split('\n\n')
     return '\n\n'.join(
         IndentedHelpFormatter._format_text(self, p) for p in paragraphs)
Exemple #5
0
 def _format_text(self, text):
     paragraphs = re.split('\n([ \t]*\n)+', text)
     paragraphs = [ IndentedHelpFormatter._format_text(self, p.strip()) for p in paragraphs ]
     return '\n'.join(paragraphs) # each already ends in a newline