nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] trailing whitespace in replied text

2014-09-14 06:02:37
Hi David,

Yeah, I do that a lot because body:component="> " turns a blank
line in replied text into one with a trailing space.

Yes, that's really icky.  Would be nice if mhl supported some kind
of `strip' to prune those off afterwards.
...
Is there any need to keep the trailing whitespace of the component
with blank text lines?  I'm inclined to always strip it off.  E.g.,
"> \n" would become ">\n".

Fine by me.

Separately, I would like to add a "strip" (or "trim"?) flag to mhl to
strip trailing whitespace from non-empty body lines.  It's easy to do
and I'd use it.  "nostrip" ("notrim") would remain the default.

There already is a "leftadjust" flag to strip off leading whitespace.

Consistencies one thing, but rightadjust and bothadjust don't sound
great.  :-)  `strip' was probably my first thought due to Python which
has ''.{,l,r}strip.  Bill's suggestion of trim would be fine, but for
his associating it with Java.  He may as well have thrown PHP in as
well.  Go has strings.Trim though, so that's alright, though it trims
any of the given set of runes;  it's TrimSpace that strips Unicode
space.  Might be worth considering if trim="\"" is a future possibility.
Otherwise, it's looking trim.

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>