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

Indentation and PHP tags

From: Steen Studstrup <steen@entree.fr>
Date: Sun, 17 Jun 2001 10:25:55 +0200
Message-ID: <001501c0f707$42c03b60$91c8f8c1@ftizwrdhr2>
To: <html-tidy@w3.org>
I experience that for each use of Tidy the contents and the ending tag is indented one step. Also the starting tag of the PHP tag no. 2 is lifted to follow the ending tag of the first PHP tag. As you can see the accumulating indentation only happens with PHP tags inside HTML tags.

It looks like this:

Start situation:

<?php
  echo "text1";
?>
<?php
  echo "text2";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title>
      Untitled
    </title>
  </head>
  <body>
    <?php
      echo "text1";
    ?>
    <?php
      echo "text2";
    ?>    
  </body>
</html>

After 4 Tidy's

<?php
  echo "text1";
?><?php
  echo "text2";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title>
      Untitled
    </title>
  </head>
  <body>
    <?php
                      echo "text1";
                    ?><?php
                      echo "text2";
                    ?>
  </body>
</html>

indent is set to yes (which I want it to be). I have tried changing all other setting which I thougth might be relevant but with no success.
I use tidy.exe dating 16/11/00 with HomeSite 4.5.2.

entree.fr
e-mail: steen@entree.fr
Internet: www.entree.fr
Tel/Fax:(+33) (0)4 94 84 72 56
Received on Sunday, 17 June 2001 04:27:06 GMT

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