W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 1999

Still having a few minor problems with PHP :-(

From: Richard Allsebrook <Richard.Allsebrook@easysoft.com>
Date: Wed, 28 Jul 1999 09:37:37 +0100
Message-ID: <D1E48F0DACF1D21188AD006097316DAB17F927@winter.easysoft.com>
To: Tidy <html-tidy@w3.org>
Hi again,
	Thanks for sorting out the problems I had with TIDY mangling my PHP
scripts, they have been incorporated into build 260 of HTML Kit and work
superbly apart from one or two minor things...

TIDY does strange things to indentation if it is run repeatedly on the same
PHP, for example: (This may or may not work due to my email editor (Outlook
98) messing with the formatting)...

<?
echo "This is a piece of text on one line<br>"
."This is on another<br>"
."This is a really long line to show what happens when TIDY breaks long
lines to fit within column boundaries<br>";
?>

The first time it is TIDY'd:

<?
    echo "This is a piece of text on one line<br>"
    ."This is on another<br>"
    ."This is a really long line to show what happens when TIDY
    breaks long lines to fit within column boundaries<br>";
    ?>

The second time its TIDY'd:

<?
        echo "This is a piece of text on one line<br>"
        ."This is on another<br>"
        ."This is a really long line to show what happens when TIDY
        breaks long lines to fit within column boundaries<br>";
        ?>

after a few more runs, the code looks like this:

<?
                echo "This is a piece of text on one line<br>"
                ."This is on another<br>"
                ."This is a really long line to show what happens
    when
        TIDY
                breaks long lines to fit within column
    boundaries<br>";
                ?>

As you can (hopefully) see, TIDY is indenting the PHP script each time its
run and breaking lines at the line break column.

I have also noticed strange things happening to other PHP elements.  These
things do not break the scripts (adding whitespace has very little effect on
PHP), but after a few runs of TIDY, the code starts to become unreadable -
braces no longer line up, comments start to misalign etc.

Would it not be better to have TIDY completely ignore everything between the
Script tags?  No processing or formatting at all?

All in all, TIDY is a superbly implemented product and I realize my script
requirements are outside the scope of TIDY's HTML handling, but they do
affect the usability of the product for (I'll guess) a large chunk of
professional writers.

Richard Allsebrook
Webmaster - Easysoft Limited
http://www.easysoft.com <http://www.easysoft.com> 
* No 3 the Embankments, Leeds LS1 4BJ, UK
*+44 0113 2220400
Received on Wednesday, 28 July 1999 04:39:16 GMT

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