Re: Not a bug, but an idea.

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.

HTH,
Kevin

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