Function
_extendLine
(s, line, word, line_width, next_line_prefix, legacy)
Source from the content-addressed store, hash-verified
| 691 | |
| 692 | |
| 693 | def _extendLine(s, line, word, line_width, next_line_prefix, legacy): |
| 694 | needs_wrap = len(line) + len(word) > line_width |
| 695 | if legacy != '1.13': |
| 696 | s# don't wrap lines if it won't help |
| 697 | if len(line) <= len(next_line_prefix): |
| 698 | needs_wrap = False |
| 699 | |
| 700 | if needs_wrap: |
| 701 | s += line.rstrip() + "\n" |
| 702 | line = next_line_prefix |
| 703 | line += word |
| 704 | return s, line |
| 705 | |
| 706 | |
| 707 | def _formatArray(a, format_function, line_width, next_line_prefix, |
Tested by
no test coverage detected