- From: Matthew Chamberlain <mwchamberlain@gmail.com>
- Date: Fri, 23 Jan 2009 19:56:32 +1100
- To: html-tidy@w3.org
- Message-ID: <1fb2067f0901230056p279b56f4k63487d6766417958@mail.gmail.com>
I have just recently installed HTML Tidy but am having difficulty with the
formatting of embedded pre-processor commands. Tidy is taking embedded php
statements and removing the line breaks between them, eg:
<html>
<head>
<title>HELLO WORLD!</title>
</head>
<h1>HELLO WORLD</h1>
<?php echo "Hello World!"; ?>
<?php echo "Why does this line get appended to the previous?"; ?>
<?php echo "Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Integer sodales. Proin mollis, turpis sit amet eleifend suscipit, magna
dolor consequat ipsum, nec lacinia risus nulla ultricies metus."; ?>
</body>
</html>
becomes
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux (vers 6 November 2007), see www.w3.org">
<title>
HELLO WORLD!
</title>
</head>
<body>
<h1>
HELLO WORLD
</h1><?php echo "Hello World!"; ?><?php echo "Why does this line get
appended to the previous?"; ?><?php echo "Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Integer sodales. Proin mollis, turpis sit amet
eleifend suscipit, magna dolor consequat ipsum, nec lacinia risus nulla
ultricies metus."; ?>
</body>
</html>
For some reason the 'wrap-php' seems to have no effect either, with the
third php statement in the example given staying on a single line. I have
tried a whole mixture of settings in the tidy config file but nothing seems
to work. Here is the config I'm currently using:
bare:no
clean:no
escape-cdata:no
fix-bad-comments:yes
fix-backslash:yes
indent:yes
indent-attributes:no
indent-spaces:2
literal-attributes:yes
char-encoding:raw
replace-color:yes
wrap:80
wrap-asp:yes
wrap-jste:yes
wrap-php:yes
write-back:no
System:
Ubuntu Studio 8.04 amd64
Tidy version: HTML Tidy for Linux released on 6 November 2007
Any help would be much appreciated,
Thanks,
Matt
Received on Friday, 23 January 2009 10:53:22 UTC