This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap-website".
The branch, master has been updated
via 30a5b4b11a2f3ecdb6f2e36db9c2b0a333e9b214 (commit)
via 83ae9baeb3a02967916cbffc828e9e62a96fdc4d (commit)
from 9c1ed7f34151e2ae610711d1f3b2878d4563ec7d (commit)
Summary of changes:
templates/docs/tutorials/heist.md | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 30a5b4b11a2f3ecdb6f2e36db9c2b0a333e9b214
Merge: 9c1ed7f 83ae9ba
Author: Gregory Collins <[email protected]>
Date: Tue Oct 26 18:25:58 2010 +0200
Merge branch 'doc-addition' of http://github.com/wlangstroth/snap-website
commit 83ae9baeb3a02967916cbffc828e9e62a96fdc4d
Author: stwill <[email protected]>
Date: Thu Oct 21 19:32:19 2010 -0400
heist.md: added includes for clarity
diff --git a/templates/docs/tutorials/heist.md
b/templates/docs/tutorials/heist.md
index a721eee..74f75c1 100644
--- a/templates/docs/tutorials/heist.md
+++ b/templates/docs/tutorials/heist.md
@@ -355,12 +355,16 @@ The following is code for a splice that calculates the
factorial of a
number.
~~~~~~~~~~~~~~~ {.haskell}
+import Text.Templating.Heist
+import qualified Data.ByteString.Char8 as B
+import qualified Text.XML.Expat.Tree as X
+
factSplice :: Splice Snap
factSplice = do
input <- getParamNode
let text = B.unpack $ textContent input
n = read text :: Int
- return [Text $ B.pack $ show $ product [1..n]]
+ return [X.Text $ B.pack $ show $ product [1..n]]
~~~~~~~~~~~~~~~
You must tell Heist to bind the splice to an XML tag using the
-----------------------------------------------------------------------
hooks/post-receive
--
snap-website
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap