Re: conf file usage?

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 
version.


> 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:

  http://lists.w3.org/Archives/Public/html-tidy/2001JanMar/0013.html

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 
order:

 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