On Tue, 18 Aug 2020 at 17:19, Daniel Gruno <[email protected]> wrote:
>
> On 18/08/2020 18.15, sebb wrote:
> > Now that the wrap_fixed=False is set, it looks like no messages are
> > actually changed by the rewrapping.
> >
> > I think this is because the decode() method splits lines using
> > b'\r\n', i.e. CRLF
> > However it looks like all the mbox files use just LF as their line endings.
> >
> > So decode will always return the body as a single chunk to
> > convertToWrapped() which then does nothing unless wrap_fixed=True.
> >
>
> Good catch! I was indeed wondering why the tests were passing on all
> fronts, as one part uses the decode and the other should fail to use it
> (and thus the results should be different).

Depends.

The output will only be different if there are soft returns, i.e. a
space at the end of a line just before CRLF.

> Should we be changing lonely LFs to CRLF here, when flowed?

I wondered about that.

Now that the reformat is done after MID generation, it would not
affect the generators.
And it would only need to be done for f=f types.

Also in theory it would only need to be done for mbox imports --
AFAICT live messages *should* have CRLF line terminators.

Reply via email to