Re: Meaning and use of TIDY_STORE_ORIGINAL_TEXT

Bjoern Hoehrmann <[email protected]> Thu, 05 Jan 2006 23:02:55 +0100
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
* Geoff Air wrote:
>I have been trying to use this 'feature' that someone
>put considerable effort into adding ... with an idea
>of trying to retain more of the user's given format,
>and other such output formatting things ... was this
>originally ONLY done for 'diagnostics'?

You can use the tidy-cvs mailing list or the online CVS web installation
to check who/when/why things were changed or added to Tidy. This is not
a documented feature and may change any time. IIRC, you cannot use this
code directly, you have to add your own parser loop (which you cannot as
the various functions to do this are not exposed by the code) to do some
minimal parsing. It's also possible that more recent changes broke the
feature.

>If it is AGREED, I hope these changes can be ADDED to the
>CVS source ... NOTE, they ONLY come into effect when
>the TIDY_STORE_ORIGINAL_TEXT is defined, and it is NOT
>usually defined ... thus should have NO EFFECT on the
>present releases ...

Well, I am not sure we should touch this; the old code was an ugly mess
and had some very subtle bugs (which I do not remember anymore) and it
seems you could not quite work out how this was supposed to work... It
seems I used it to parse the document for the !DOCTYPE like

    while ((node = GetToken(doc, Preformatted)) != NULL)
      ...

I am not sure it should do anything else. Regarding the spacing, Tidy
very conciously normalizes the spacing; it's true that some people would
like to retain their original spacing or would like more options to take
more formatting choices into account, but I don't think the code here is
stable enough to do anything like that.
-- 
Björn Höhrmann · mailto:[email protected] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click