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

Re: conf file usage?

From: J. David Bryan <jdbryan@acm.org>
Date: Fri, 19 Jan 2001 12:20:09 -0500
Message-Id: <200101191720.MAA26958@mail.bcpl.net>
To: HTML Tidy List <html-tidy@w3.org>
On 18 Jan 2001, at 12:31, Ryan Gallagher wrote:

> I have a conf file for my tidy installation...

Which version of HTML Tidy are you running and on what platform?  Running 
"tidy -v" should tell you, assuming you're running the stand-alone C 

> but i'm having trouble telling if it is using it...

Tangent to this, I have an enhancement patch to Tidy that lists the 
configuration file(s) used when Tidy is run (Tidy can actually use more 
than one config file in a given run).  I'll post this to the list in a day 
or two.

> it appears to be except that i have the "keep-time:" set to "yes".  And
> it's still modifying the date. 

Without seeing your command line and the contents of your config file(s), I 
can't determine the problem.  However, to diagnose, I'd recommend that you 
strip your config file down to just:

  write-back: yes
  keep-time: yes

...and see if that works.

> I have lots of "//" style comments in the conf file... i don't know if
> these are allowed anywhere or just at the top.  Anyone know what the
> comment lines have to conform to in order not to mess up the file? 

The comment parsing in "config.c" is a little...uh...loose.  If I read it 
correctly, Tidy is looking only for a "/" as the _first_ character of a 
line.  If it finds that single slash, the rest of the line is interpreted 
as a comment (even if a second slash does not follow).  Also, a line 
beginning with white space and then a comment delimiter (i.e., "//") will 
*not* be seen as a comment.  Nor can comments appear on the same line as 
configuration commands.

So all of your "<tab>// etc." lines are being parsed as config commands.  
However, Tidy doesn't report invalid config commands (I have another patch 
for that :-), so these lines are being silently ignored when they don't 
match defined commands.  Therefore, even though Tidy isn't seeing them as 
comments, they shouldn't be causing your problem.

> here's a snip:

Note that if you're listing *every* config command in your config file, 
there's a bug in the current (4-Aug-00) version that causes the "alt-text" 
and "doctype" commands to be parsed improperly.  I haven't investigated to 
see if this might cause your trouble, but you could verify by removing or 
commenting out those commands if they are present.  See:


for details.

> // set an env. var HTML_TIDY to point to this file
> // or use this syntax:
> //
> // tidy -config /path/to/config/file [other options] targetfile(s)

Note that Tidy will process config commands from these sources and in this 

 1.  A compiled-in default filename, if defined.

 2a. A configuration filename designated by the HTML_TIDY environment
     variable, if defined, or...

 2b. A ".tidyrc" file, if present in the HOME directory.

 3.  A configuration filename supplied on the command line.

Perhaps you're getting "keep-time: no" from one of these sources?

                                      -- Dave
Received on Friday, 19 January 2001 12:20:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:49 UTC