diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2015-04-03 16:51:11 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2015-04-03 16:51:11 +0200 |
commit | 2819aebaf71ec0482d5c03bfb26a45f251474bb8 (patch) | |
tree | 26328848f81049ef287a51ef4e848bf239d58cc6 /src/Hakyll | |
parent | 9fa80ad38cdec6a1c3694562b0c378a782e50617 (diff) | |
download | hakyll-2819aebaf71ec0482d5c03bfb26a45f251474bb8.tar.gz |
Fix typos in "separator"
See #342
Diffstat (limited to 'src/Hakyll')
-rw-r--r-- | src/Hakyll/Web/Template/Context.hs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/Hakyll/Web/Template/Context.hs b/src/Hakyll/Web/Template/Context.hs index f74af25..63828ed 100644 --- a/src/Hakyll/Web/Template/Context.hs +++ b/src/Hakyll/Web/Template/Context.hs @@ -23,7 +23,7 @@ module Hakyll.Web.Template.Context , modificationTimeField , modificationTimeFieldWith , teaserField - , teaserFieldWithSeperator + , teaserFieldWithSeparator , missingField ) where @@ -319,16 +319,19 @@ modificationTimeFieldWith locale key fmt = field key $ \i -> do teaserField :: String -- ^ Key to use -> Snapshot -- ^ Snapshot to load -> Context String -- ^ Resulting context -teaserField = teaserFieldWithSeperator teaserSeparator +teaserField = teaserFieldWithSeparator teaserSeparator --- | A context with "teaser" key which contain a teaser of the item, defined as the snapshot content before the teaser separator. --- The item is loaded from the given snapshot (which should be saved --- in the user code before any templates are applied). -teaserFieldWithSeperator :: String -- ^ Separator to use + +-------------------------------------------------------------------------------- +-- | A context with "teaser" key which contain a teaser of the item, defined as +-- the snapshot content before the teaser separator. The item is loaded from the +-- given snapshot (which should be saved in the user code before any templates +-- are applied). +teaserFieldWithSeparator :: String -- ^ Separator to use -> String -- ^ Key to use -> Snapshot -- ^ Snapshot to load -> Context String -- ^ Resulting context -teaserFieldWithSeperator separator key snapshot = field key $ \item -> do +teaserFieldWithSeparator separator key snapshot = field key $ \item -> do body <- itemBody <$> loadSnapshot (itemIdentifier item) snapshot case needlePrefix separator body of Nothing -> fail $ |