W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2000

Re: [FIX] Tidy wraps attributes when told not to

From: Dave Raggett <dsr@w3.org>
Date: Thu, 30 Mar 2000 19:40:19 +0100 (GMT Daylight Time)
To: "J. David Bryan" <dbryan@bcpl.net>
cc: HTML Tidy List <html-tidy@w3.org>
Message-ID: <Pine.WNT.4.10.10003301939320.-330895@hazel.hpl.hp.com>
On Fri, 24 Mar 2000, J. David Bryan wrote:

> 
>     Further to my report of 22 January, it appears that the
> reason Tidy wraps when it shouldn't is a problem in lines
> 682-683 of "pprint.c":
> 
>   else if (!attr->dict->nowrap || WrapAttVals)
>       wrappable = yes;
> 
> If I understand this correctly, it means that wrapping of
> attributes is performed if the internal "wrapping is prohibited"
> flag is not set or the user has asked for wrapping.  However, I
> think the logic should be that wrapping is performed if the
> internal "wrapping is prohibited" flag is not set AND the user
> has asked for wrapping.  In other words, if the user says,
> "don't wrap," then wrapping should not be allowed.
> 
> I think this change fixes the problem:
> 
>   else if (!attr->dict->nowrap && WrapAttVals)
>       wrappable = yes;

Thanks. I seem to have already applied this change, at least
in my development code base. Watch for the next release.

Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
tel/fax: +44 122 578 3011 (or 2521) +44 385 320 444 (mobile)
World Wide Web Consortium (on assignment from HP Labs)
Received on Thursday, 30 March 2000 13:40:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:43 GMT