From 2819aebaf71ec0482d5c03bfb26a45f251474bb8 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Fri, 3 Apr 2015 16:51:11 +0200 Subject: Fix typos in "separator" See #342 --- src/Hakyll/Web/Template/Context.hs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/Hakyll') 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 $ -- cgit v1.2.3