[dev] Re: [cvs] commit: imp/lib BodyText.php
Nuno Loureiro
nuno@co.eth.pt
31 May 2002 16:45:47 +0100
On Thu, 2002-05-30 at 17:50, Michael M Slusarz wrote:
> For example, the following reply text:
>
> > > 1. One
> > > 2. Two
> > > 3. Three
>
> Will be justified with my current code like this:
>
> > > 1. One 2. Two 3. Three
>
> Somehow the code needs to be written to distinguish between this example
> and this example
Maybe I'm missing something here, but I think both cases are complety
different, since the first one doesn't need wrapping and the second one
does. I didn't look at your code yet (just did it in a glance), but the
first case, determining the length of the line doesn't need any
wrapping. The second case, needs wrapping, so the next line would have
the current quoting string plus the rest of the current line (the
wrapped part). [before answering this, read on... <g>)
My only problem is in the reliability of IMP_BodyText::is_quote($val);
How do you know if something is a quote prefix or author's text ?
For example, some MUAs use as the quote prefix the original sender's
initials like this:
---
Michael Slusarz wrote:
(MS) blabla bla blablablabla blba blabla blabla
(MS) bla blabla
---
I didn't check IMP_BodyText::is_quote(), but does it count with
scenarious like this one? or does it try to find only common used
prefixes, like >, }, |, etc?
> > > Words words words words words words words words words words words
> > words
> > > words words.
>
> Which should be justified like this:
>
> > > Words words words words words words words words words words words
> > > words words words.
>
> etc. etc. I think some kind of lookback will be necessary to determine i=
f
> the word on the second line should actually (by looking at the length of
> the word) be with the previous line.
I think I'm not understanding one thing here, which is probably what I'm
missing here.
1-Are you trying to justify the message *after* your MUA prefix it with
the quoting string and do lame wrapping?
2-Or are you trying to justify a message previously messed up by a
previous MUA?
3-Or are you trying to justify a message "at the same time" you prefix
it with the quoting string?
If your answer is 1, then I think it should be done like in 3.
If your answer is 3, then If you first insert the quoting prefix without
any wrapping, and on a second stage wrap+justify it, sounds more easier
and you'll not have the problem you mentioned because the first example
doesn't need to be wrapped and second one does, according to line
lengths.
If your answer is 2, then I think we have a serious problem here,
because this can happen "in real life", I mean, this could be a case
where some lame wrapping *wasn't* done. Image this scenario:
Original message:
Words words words words words words words words words words words
words words.
My reply message before I write anything:
> Words words words words words words words words words words words
> words words.
My reply message after my inserted text:
> Words words words words words words words words words words words
words
> words words.
His reply:
> > Words words words words words words words words words words words
> words
> > words words.
okay.
My next reply:
> > > Words words words words words words words words words words words
> > words
> > > words words.
Okay, I have your scenario where you were trying to do intelligent
wrapping, which you shouldn't.
I'm sorry if I misunderstood something.
I'll not have time this weekend to look at this, because I'll go
camping, but next week I'll try to look at it deeply.
Regards,
-nuno
--
Nuno Loureiro <nuno@eth.pt>
Ethernet, Soluções Informáticas, LDA
http://www.eth.pt