chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: spiffy patch attempt (was Re: [Chicken-users] Minor issue with spiff


From: Peter Wright
Subject: Re: spiffy patch attempt (was Re: [Chicken-users] Minor issue with spiffy's sxml->html)
Date: Mon, 1 Jan 2007 09:54:51 +0900
User-agent: Mutt/1.5.13 (2006-08-11)

On 31/12 16:03:01, John Cowan wrote:
> Peter Wright scripsit:
> > Hence my following attempt at a patch for the latest spiffy-base.scm
> > which also incorporates (steals? :)) the sxml-transforms special
> > handling for (a) inline tags, and (b) certain tags when they're empty.
> 
> A suggestion for all this introduction of newlines:  instead of
> adding newlines after end-tags

Before start-tags, not after end-tags.

> and worrying about which ones can and cannot have a problem with it,
> why not add a newline *within* the end-tag, thus:  "</b\n>"?  That's
> a general solution and simplifies the problem greatly.

That's actually quite an interesting (== weird :)) idea, but I suspect
the resultant HTML would look a bit too strange/unreadable. Another
approach could be to not generate newlines at all, but that'd also end
up being overly difficult to read (for humans).

The sxml-transforms approach isn't too complicated, but (I think)
strikes the right balance between generating human-readable HTML and
generating HTML that's a "correct" representation of the SXML.


Pete.
-- 
http://flooble.net/blog
"The effect of reading an Unlambda program is like having your brains
smashed out by a Lisp s-expression wrapped around an ENIAC. You won't
find anything like it west of Alpha Centauri."
    -- The Hitch-Hacker's Guide to Programming, discussing Unlambda




reply via email to

[Prev in Thread] Current Thread [Next in Thread]