Unwrapping <!-- comments.

Wondering if there's a "work-around" to a known bug:

Tidy bug report 953800 is "-i unwraps comments".  The bug report shows as open since 2004.  The bug concerns the fact that HTML/XHTML comments get wrapped onto the preceding line, so that (in a trivial example):

----

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>This page is dull</title>
<!-- It might get more interesting later  -->
</head>
<body>
  <!-- PAGE CONTENT START -->
  Hello, world
  <!-- PAGE CONTENT END -->
</body>
</html>

---

via "tidy -i" becomes ...

---

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
  <title>This page is dull</title><!-- It might get more interesting later  -->
</head>

<body>
  <!-- PAGE CONTENT START -->
  Hello, world <!-- PAGE CONTENT END -->
</body>
</html>

---

The bug has been open for a while, and I presume (can't claim to have looked) that the problem is either subtle or  that there is a simple work-around that I'm simply missing.

Any pointers?

Bryan


-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com

Powered by Outblaze

Received on Saturday, 17 November 2007 16:27:50 UTC