bug or feature ?> -slides and block-level elements around <h2>

Hello,

The -slides option is interesting. But i have problems with it when i
use block-level elements (<DIV>, <CENTER>, etc.) around <H2>s.

For example, "tidy -slides" on the following HTML document reports and
creates 4 slides (no errors, no warnings), it's ok:

 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <HTML lang="fr">
 <HEAD>
  <TITLE>test slides</TITLE>
 </HEAD>
 <BODY>

 <H1>title</H1>
 <H2>subtitle1</H2>
 <P>blablabla1</P>

 <H2>subtitle2</H2>
 <P>blablabla2</P>

 <H2>subtitle3</H2>
 <P>blablabla3</P>

 </BODY>
 </HTML>


But "tidy -slides" on the same HTML document except for one <DIV> </DIV>
reports and creates only 1 slide (no errors, no warnings):

 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <HTML lang="fr">
 <HEAD>
  <TITLE>test slides</TITLE>
 </HEAD>
 <BODY>

 <DIV>
  <H1>title</H1>
  <H2>subtitle1</H2>
  <P>blablabla1</P>

  <H2>subtitle2</H2>
  <P>blablabla2</P>

  <H2>subtitle3</H2>
  <P>blablabla3</P>
 </DIV>

 </BODY>
 </HTML>

It also generates only 1 slide if the <DIV> is after the </H1> and also
if i use <DIV>s around the <H2>s like that:

  <H1>title</H1>
  <DIV>
   <H2>subtitle1</H2>
   <P>blablabla1</P>
  </DIV>
  <DIV>
   <H2>subtitle2</H2>
   <P>blablabla2</P>
  </DIV>
  <DIV>
   <H2>subtitle3</H2>
   <P>blablabla3</P>
  </DIV>


It seems that tidy only considers <H2> with a depth=1. 
Is it a bug or a feature ? 


Thanks,
bye
-- 
Raphaël.Marée.
http://altern.org/bugraph/

Received on Saturday, 7 August 1999 10:38:44 UTC