W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2004

Re: Merging classes of consecutive elements

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 14 May 2004 09:36:00 +0200
To: jany.quintard@free.fr
Cc: html-tidy@w3.org, Steffen Glückselig <steffen@gungfu.de>
Message-ID: <40b5760a.917933108@smtp.bjoern.hoehrmann.de>

* Jany Quintard wrote:
>I tried this:
>cat test.html | tidy -i
>
>with test.html:
><body>
>        <div class="t1">
>                <div class="t2">
>                        test
>                </div>
>        </div>
></body>

Use -clean and you will get

  <body>
    <div class="t1 t2">
      test
    </div>
  </body>

In basically any recent version. Tidy 04 August 2000 would give

  <body>
    <div class="t1">
      test
    </div>
  </body>

In clean.c we have

  /*
      Symptom <div><div>...</div></div>
      Action: merge the two divs
  
    This is useful after nested <dir>s used by Word
    for indenting have been converted to <div>s
  */

As I've said, `--merge-divs no` would disable this behavior.
Received on Friday, 14 May 2004 03:39:40 GMT

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