Unwrapping <!-- comments.

"Bryan Hodgson" <[email protected]>
Newsgroups gmane.comp.web.html-tidy.user
Message-ID <[email protected]>
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
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.