W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2010

Re: Tidy converts "--" in comments...

From: Dennis Kowallek <kowallek@iglou.com>
Date: Mon, 01 Mar 2010 08:14:44 -0500
To: html-tidy@w3.org
Message-ID: <7keno5hubd6fb8d2puu9b7qi22i8l5k761@4ax.com>
On Mon, 01 Mar 2010 12:48:21 -0000, "Fred Bone"
<Fred.Bone@dial.pipex.com> wrote:

>On 1 March 2010 at 6:59, Dennis Kowallek said:
>
>> On Sun, 28 Feb 2010 01:20:42 +0100, Bjoern Hoehrmann <derhoermi@gmx.net>
>> wrote:
>> 
>> >>I am running tidy.exe for windows dated 22 March 2008.
>> >>
>> >>I have "fix-bad-comments: no" in the cfg file. But tidy converts "--" in
>> >>comments to "-=".
>> >>
>> >>I would like tidy to leave these alone. What am I doing wrong?
>[...]
>> The reason I asked is that these comments actually contain valid HTML that
>> I may wish to uncomment in the future. I would prefer that tidy did not
>> muck with this.
>
>The only source of difficulty I can think of would be existing comments 
>which you now want to embed in a larger commented-out block. The closing 
>marker will cause problems anyway, so you are almost certainly better off 
>letting Tidy do its thing.
>
>Would you care to show an example or two, in case anyone has bright 
>ideas?

I actually have some HTML text (a transcription of a letter) that
contains...

<p>To be sure, a little more care in spelling would not be amiss -- The
Post Master at Lancaster made a mistake also by marking it Sept. 23
&#150; instead of August &#150; what is the matter with the folks in
Lancaster &#150; they had better go to school to Mr Carter -</p>

I have this commented out temporarily. When I send it thru tidy it
converts the "--" to "-=".

Like I said, I am working around it by sending the files thru a script
AFTER running tidy that converts "-=" back to "--".

I know I can convert all these double hyphens to &#045; or en or em
dashes. That may be a better solution.

Thanks for your comments...

-- 

Dennis
Received on Monday, 1 March 2010 13:15:17 GMT

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