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 "heist".
The branch, 0.2-dev has been updated
via 34a38cb6057758b18120bcbfaa44921c400cd6ee (commit)
via 8237880579b857632c369b65fefb13f2b93c3644 (commit)
from a0ffa12803130934ea0a88fc60ff7e864b496df8 (commit)
Summary of changes:
src/Text/Templating/Heist/Internal.hs | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 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 34a38cb6057758b18120bcbfaa44921c400cd6ee
Merge: a0ffa12 8237880
Author: Mighty Byte <[email protected]>
Date: Mon May 31 10:56:33 2010 -0400
Merge branch 'master' into 0.2-dev
diff --cc src/Text/Templating/Heist/Internal.hs
index 0a6c983,614136c..9627bad
--- a/src/Text/Templating/Heist/Internal.hs
+++ b/src/Text/Templating/Heist/Internal.hs
@@@ -280,10 -242,10 +293,10 @@@ traversePath tm path name
lookupTemplate :: Monad m =>
ByteString
-> TemplateState m
- -> Maybe (Template, TPath)
+ -> Maybe (InternalTemplate, TPath)
lookupTemplate nameStr ts =
f (_templateMap ts) path name
- where (name:p) = case splitPaths nameStr of
+ where (name:p) = case splitTemplatePath nameStr of
[] -> [""]
ps -> ps
path = p ++ (_curContext ts)
@@@ -313,10 -275,10 +326,10 @@@ insertTemplate p t st
-- | Adds a template to the template state.
addTemplate :: Monad m =>
ByteString
- -> Template
+ -> InternalTemplate
-> TemplateState m
-> TemplateState m
- addTemplate n t st = insertTemplate (splitPaths n) t st
+ addTemplate n t st = insertTemplate (splitTemplatePath n) t st
------------------------------------------------------------------------------
@@@ -622,11 -488,10 +635,11 @@@ loadTemplate :: String -- ^ path of th
loadTemplate templateRoot fname
| ".tpl" `isSuffixOf` fname = do
c <- getDoc fname
- return [fmap (\t -> (splitPaths $ B.pack tName, t)) c]
+ return [fmap (\t -> (splitLocalPath $ B.pack tName, t)) c]
| otherwise = return []
where -- tName is path relative to the template root directory
- tName = drop ((length templateRoot)+1) $
+ correction = if last templateRoot == '/' then 0 else 1
+ tName = drop ((length templateRoot)+correction) $
-- We're only dropping the template root, not the whole path
take ((length fname) - 4) fname
-----------------------------------------------------------------------
hooks/post-receive
--
heist
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap