Re: Not changing whitespace in certain elements

Bjoern Hoehrmann <[email protected]> Mon, 09 Jan 2012 22:27:47 +0100
Newsgroups gmane.comp.web.html-tidy.user
Message-ID <[email protected]>
* Warren Block wrote:
>Line 8 starts with a tab, and line 9 starts with two tabs.  This 
>particular example is from a Makefile, where tabs are significant.  Left 
>alone, the text can be copied from the browser, and the tabs are obvious 
>from the highlighting.  But tidy replaces the tabs with spaces.
>
>Is there a way to get tidy to leave whitespace alone inside this class 
>of <pre> elements?

Tidy should never generate tabs (and you are not supposed to use them
per the HTML 4 Recommendation inside <pre> elements). Not changing the
white space is a bit difficult while also pretty printing the document,
and it is likely that the code makes various assumptions about cleanup
with respect to white spaces that would probably make this difficult to
implement, especially if this is supposed to preserve tabs.
-- 
Björn Höhrmann · mailto:[email protected] · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/