(s, line, word, line_width, next_line_prefix, legacy)
| 737 | |
| 738 | |
| 739 | def _extendLine(s, line, word, line_width, next_line_prefix, legacy): |
| 740 | needs_wrap = len(line) + len(word) > line_width |
| 741 | if legacy > 113: |
| 742 | # don't wrap lines if it won't help |
| 743 | if len(line) <= len(next_line_prefix): |
| 744 | needs_wrap = False |
| 745 | |
| 746 | if needs_wrap: |
| 747 | s += line.rstrip() + "\n" |
| 748 | line = next_line_prefix |
| 749 | line += word |
| 750 | return s, line |
| 751 | |
| 752 | |
| 753 | def _extendLine_pretty(s, line, word, line_width, next_line_prefix, legacy): |
no test coverage detected