chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Minor issue with spiffy's sxml->html


From: Peter Wright
Subject: [Chicken-users] Minor issue with spiffy's sxml->html
Date: Thu, 28 Dec 2006 23:45:00 +0900
User-agent: Mutt/1.5.13 (2006-08-11)

Hi all.

I've got a (hopefully fairly minor and fixable) issue with the
sxml->html function that's part of Spiffy. Example:

(use spiffy)
(sxml->html
  '(html
     (head (title "Title")
           (body (h1 "Heading")
                 (p "This sentence should end "
                    (a (@ (href "http://google.com/";)) "with a link")
                    ".")))))

produces:

<html><head><title>Title</title>
<body><h1>Heading</h1>
<p>This sentence should end <a href="http://google.com/";>with a link</a>
.</p>
</body>
</head>
</html>


However, I'd actually wanted the full stop to immediately follow the
link, like so:

<p>This sentence should end <a href="http://google.com/";>with a link</a>.</p>

...and not be separated by end-of-line whitespace (which renders in a
browser as a single space).

After testing it a bit, it looks like any HTML generated via
sxml->html will have all close tag(s) followed by end-of-line
character(s).

Does anyone know of a way to disable this behaviour? I was about to
dive in and investigate the sxml->html source code directly, but
thought it might be a bit more sensible to ask for help/advice first. :)


Any suggestions much appreciated, thanks.

Pete.
-- 
http://flooble.net/blog
Frankly, I'm sick and tired of hearing that Dr. Cham was a madman.
Yes, he tried to bury himself alive. Yes, he electrocuted his niece.
Yes, in fact, he did dynamite a retirement home. But this was all with
good cause and, in each case, I believe he took the correct course of
action.         -- whytheluckystiff in Why's (Poignant) Guide To Ruby




reply via email to

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