Fix wrapping of text lines with the same length as specified length limit
| | |
| | | while (count($list)) { |
| | | $line = array_shift($list); |
| | | $l = mb_strlen($line); |
| | | $newlen = $len + $l + ($len ? 1 : 0); |
| | | $space = $len ? 1 : 0; |
| | | $newlen = $len + $l + $space; |
| | | |
| | | if ($newlen <= $width) { |
| | | $string .= ($len ? ' ' : '').$line; |
| | | $len += (1 + $l); |
| | | $string .= ($space ? ' ' : '').$line; |
| | | $len += ($space + $l); |
| | | } |
| | | else { |
| | | if ($l > $width) { |
| | |
| | | I'm replying on this with a very long line which is then wrapped and
|
| | | space-stuffed because the draft is saved as format=flowed.
|
| | | From what's specified in RFC 2646 some lines need to be space-stuffed to |
| | | avoid muning during transport.
|
| | | From what's specified in RFC 2646 some lines need to be space-stuffed to avoid |
| | | muning during transport.
|
| | |
|
| | | X
|
| | |
|