Re: wrapping method



On 2001.08.03 09:52 Emmanuel wrote:

[snip]

> I think it's wrong because libbalsa_wrap_string doesn't care about 
> quotation, so if you have the following quotation :
> >>>> this is a quotation exceeding the line width
> it's wrapped that way :
> >>>> this is a quotation
> exceeding the line width
> so when we colorize we've lost the second part, like if the second was 
> not part of the quotation.
> So I think we have to be smarter when wrapping and we must integrate 
> quotation level to correctly duplicate quotation marks when we wrap the 
> text.
> The problem is that we can no more wrap the string "in place" (ie 
> without duplicating it) because we should be able to add a bunch of 
> chars to the string.
> Is it worth the pain ?
> Thanks
> Bye
> Manu

Manu:

Are you suggesting that when a quoted line is wrapped, we should prepend
the quoting string to the wrapped portion of the line? I'd argue against
this--it feels dangerous to me to mess with the text. For instance, my
regex includes `}', so C code in mail often has some lines colored; if they
were wrapped, I wouldn't want any `}'s inserted!

If all you want to do is make sure that the wrapped portion gets colored
correctly, you can check each original line before wrapping, and color all
lines that result from wrapping. I sent in a patch to do this some weeks
ago, but it may not work with Albrecht's current url-checking code.

Peter




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]