W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2000

Re: A question of style?!

From: Dave Raggett <dsr@w3.org>
Date: Sat, 16 Sep 2000 19:06:10 +0100 (GMT Daylight Time)
To: Sebastian Lange <lange@cyperfection.de>
cc: html-tidy@w3.org
Message-ID: <Pine.WNT.4.10.10009161900440.-522721@hazel.hpl.hp.com>
On Mon, 4 Sep 2000, Sebastian Lange wrote:

> (some text)
>
> <?php mkfooter(); ?>

> is turned into

> (some text) <?php mkfooter(); ?>

This is a symptom of the way Tidy works by creating a clean parse
tree and then using a few simple rules to pretty print it. What is
is being asked for is a way to mark when a line break should occur
before or after a node. These marks would be interpreted by the
pretty printer. I have made a step in this direction for comments
with the new linebreak property in Node, and it shouldn't be too
hard to extend this to cope with line break before. The main problem
is interaction with the existing line break rules in pprint.c. I
suspect that getting this right will prove quite hard!

I am learning a lot that could be taken advantage in a complete
re-implementation of HTML Tidy using an object oriented approach,
but as usual the problem is one of time. I don't have any spare
to do this. Now if someone else wants to take this on, I would be
happy to advise!

Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
tel/fax: +44 122 578 3011 (or 2521) +44 778 532 0444 (mobile)
World Wide Web Consortium (on assignment from HP Labs)
Received on Saturday, 16 September 2000 14:06:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT