Re: indent tidy (fwd)

Greetings Charlie,

Unfortunately the C version of Tidy does insert whitespace between an
<IMG> and </A> tag (and I think in other situations) which throws things
out. 

The simplest example I came up with is

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">

<HTML>
  <HEAD>
    <META name="generator" content=
    "HTML Tidy for Solaris (vers 1st January 2002), see www.w3.org">
    <META http-equiv="Content-Type" content=
    "text/html; charset=iso-8859-1">

    <TITLE></TITLE>
  </HEAD>

  <BODY bgcolor="#FFFFFF" onload="onload_handler()">
    <TABLE cellspacing="0" cellpadding="0" border="0" summary="">
      <TR>
        <TD width="203" height="22" valign="top"><A href=
        "../index.html"><IMG name="home" border="0" src=
        "../images/home.gif" width="110" height="22" alt="Home"></A><A
        href="../news/index.html"><IMG name="news" border=
        "0" src="../images/news.gif" width="93" height="22" alt=
        "News"></A></TD>
      </TR>
    </TABLE>
  </BODY>
</HTML>

Here tidy breaks the line at the end of the first <IMG> and </A> producing

        <TD width="203" height="22" valign="top"><A href=
        "../index.html"><IMG name="home" border="0" src=
        "../images/home.gif" width="110" height="22" alt="Home">
        </A><A href="../news/index.html"><IMG name="news" border=

This has been entered into the sourceforge bug tracker database.

> Hi Yann,
> 
> Just so you know, the reason Tidy does not break between anchor <A></A> 
> tags is that putting such breaks in will add whitespace to documents and 
> alter how the page looks in the browser.  Is this something you want?
> 
> I don't think there is an option (or any combination) that will do what you 
> want.
> 
> take it easy,
> Charlie
> 
> >From: Yann DUPONT <ydupont@eto.fr>
> >To: "'dsr@w3.org'" <dsr@w3.org>
> >Subject: indent tidy
> >
> >Hi
> >
> >i've a question a minor problem ( i think), i'd like that tidy object
> >doesn't return a break when meeting href tag:
> >
> >"Arial, Helvetica, sans-serif" size="1"><b><a
> >                      href=
> >                      "http://www.e-mailtouch.com/etointerne/ms/eto-p5.htm"
> >                       target="_blank"><img src=
> >
> >
> >i'd like to have :
> >"Arial, Helvetica, sans-serif" size="1"><b>
> ><a href="http://www.e-mailtouch.com/etointerne/ms/eto-p5.htm"
> >target="_blank"><img src=
> >
> >
> >here's my setting:
> >
> >
> >TidyObj.Options.Doctype = auto
> >TidyObj.Options.DropFontTags = false
> >TidyObj.Options.OutputXhtml = false
> >TidyObj.Options.Indent = 2'2 'AutoIndent '2
> >TidyObj.Options.IndentSpaces = 3
> >TidyObj.Options.TabSize = 2
> >TidyObj.Options.Wrap = 72
> >TidyObj.Options.IndentAttributes = false
> >TiDyObj.Options.WrapAsp = true
> >TidyObj.Options.QuoteMarks = false
> >TidyObj.Options.QuoteAmpersand = false
> >TiDyObj.Options.BreakBeforeBr = false
> >TiDyObj.Options.Clean = false
> >TiDyObj.Options.ShowWarnings = true
> >
> >
> >I need to autowrap absolutly
> >.....
> >
> >
> >......
> >
> >what option do i need to force for parsing html correctly?
> >
> >Thx for your answer
> >
> >yann


TTFN,

   Philip Riebold                                /"\
   Media Resources                               \ /
   University College London                      X  ASCII Ribbon Campaign
   Windeyer Building, 46 Cleveland Street        / \ Against HTML Mail
   London, W1T 4JF
   +44 (0)20 7580 9872
   http://www.ucl.ac.uk/mediares/vconf

Received on Wednesday, 5 June 2002 12:46:33 UTC