[dev] Re: [cvs] commit: imp/lib BodyText.php

Michael M Slusarz slusarz@bigworm.colorado.edu
Thu, 30 May 2002 10:50:23 -0600


Quoting Nuno Loureiro <nuno@co.eth.pt>:

| 
| I'm really interested in that feature for IMP. I hate when I reply a
| message and message's indentation is all messy.
| 
| I lost your original post, where you wrote an URL of that feature
| implemented in Pine I guess.. Can you send me the url again?

The URL can be found in the actual BodyText.php file - look at the headers 
to the is_quote() method.

| Could you send me what've you done, or what do you need to be done, so I
| can help?
| 

My (lame) beginning code can be found at:
http://bigworm.colorado.edu/imp-patches/BodyText.new.phps

The biggest problem I am running into is this - The code is not "smart" 
enough right now to distinguish between a wrapped line and a line break.

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

> > 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 if 
the word on the second line should actually (by looking at the length of 
the word) be with the previous line.

michael

______________________________________________
Michael Slusarz [slusarz@bigworm.colorado.edu]
The University of Colorado at Boulder