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

Roman Neuhauser cynic@mail.cz
Fri, 31 May 2002 15:32:30 +0200


> Date: Thu, 30 May 2002 10:50:23 -0600
> From: Michael M Slusarz <slusarz@bigworm.colorado.edu>
> To: dev@lists.horde.org
> Subject: Re: [dev] Re: [cvs] commit: imp/lib BodyText.php
 
> 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.

    so you're going to write a language analysis system in PHP? wow!

    seriously though, how are you going to distinguish lines broken by
    lame MUAs from something like this:

    > foo wrote:
    > > > > qux wrote:
    > > > > I'm qux the great
    > bullshit.

-- 
FreeBSD 4.5-STABLE
3:26PM up 3 days, 5:21, 15 users, load averages: 0.00, 0.02, 0.00