W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2007

Unwrapping <!-- comments.

From: Bryan Hodgson <bryanh@operamail.com>
Date: Fri, 16 Nov 2007 19:36:48 +0100
To: html-tidy@w3.org
Message-Id: <20071116183648.ADB92CA0A4@ws5-11.us4.outblaze.com>

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 GMT

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