W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2001

Re: Not a bug, but an idea.

From: Kevin Brannen <kevin.brannen@springbow.com>
Date: Tue, 08 May 2001 10:39:28 +0000
Message-ID: <3AF7CCE0.AC92B8DF@springbow.com>
To: html-tidy@w3.org
Mark Menard wrote:
> Hi,
>         I've recently started using Tidy and it's great. I have a simple
> request. I'd like to be able to tell it to use a tab character for the
> identing instead of it being hardcoded to "  ". If you point me at the
> right area in the code I'd be happy to take a look.
> Thanks,

Please understand that I've never looked at the code before, and that I've only spent 2
minutes looking at it just now, but it seems to me pprint.c is where you want to go.  Look
at functions WrapLine and WrapAttrVal and PFlushLine and ...  Note the arg "indent" and how
it's used.  I don't think the problem is as simple as you want (or should be. :-)  Maybe you
could change all those to call a single function which "did the right thing", then fix that
function like you want?  In your case, I think you want to print "indent/2" tabs, plus
"indent%2" spaces (unless you can guarantee indent is always even).

Perhaps someone more knowledgable about the code can add more.

Received on Tuesday, 8 May 2001 11:42:21 UTC

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