Tidy removing line breaks between embedded php statements

Matthew Chamberlain <[email protected]>
Newsgroups gmane.comp.web.html-tidy.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.