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

Re: Tabs vs. Spaces: please explain

From: Andre Majorel <aym-ydit-lmth@teaser.fr>
Date: Mon, 13 Feb 2006 23:34:12 +0100
To: Michiel van Oosterhout <michiel@elan.nl>
Cc: html-tidy@w3.org
Message-ID: <20060213223412.GA19926@atc5.vermine.org>

On 2005-12-20 11:44 +0100, Michiel van Oosterhout wrote:

> However, the documentation states: "Tidy never outputs tabs".
> [...] Like I said, it would be very good to support both, and
> would make _everyone_ more happy. [...] Is anyone going to add
> some kind of indent-with: tabs|spaces option? Is this even
> possible? It's ok if the Tidy programmers would say no to tabs
> (I'd be very disappointed), but at least _explain_ it to me.

Perhaps because then someone would ask "if we have 9 spaces,
couldn't Tidy output a tab and a space ?" and they'd have to add
yet another option and write the accompanying documentation.

Piping the output of tidy into

  unexpand -t 1 | sed 's/^ /\t/'
will turn each leading space into a tab. Works for me with GNU
unexpand and GNU sed. The "\t" bit is not portable. If it doesn't
work with your version of sed, try entering a literal tab instead
(you may have to hit ^V first).

André Majorel <URL:http://www.teaser.fr/~amajorel/>
Do not use this account for regular correspondence.
See the URL above for contact information.
Received on Wednesday, 15 February 2006 05:25:16 UTC

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