diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2013-02-26 10:05:14 -0800 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2013-02-26 10:05:14 -0800 |
commit | ac527bd91e7f5a053f78a3bfa08525a290d82450 (patch) | |
tree | 54231f2c216db429ad5b35538bf288ff1c94d584 /src | |
parent | 151c142960d41833f72d0ac06ee5710a42639384 (diff) | |
parent | 4d244168a7d39b0064765213d0f0949b048f9a0d (diff) | |
download | hakyll-ac527bd91e7f5a053f78a3bfa08525a290d82450.tar.gz |
Merge pull request #115 from pjones/master
Ignore initial whitespace in a continuation line for a metadata field
Diffstat (limited to 'src')
-rw-r--r-- | src/Hakyll/Core/Provider/Metadata.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Hakyll/Core/Provider/Metadata.hs b/src/Hakyll/Core/Provider/Metadata.hs index 276483b..ee07e9f 100644 --- a/src/Hakyll/Core/Provider/Metadata.hs +++ b/src/Hakyll/Core/Provider/Metadata.hs @@ -9,6 +9,7 @@ module Hakyll.Core.Provider.Metadata import Control.Applicative import Control.Arrow (second) import qualified Data.ByteString.Char8 as BC +import Data.List (intercalate) import qualified Data.Map as M import System.IO as IO import Text.Parsec ((<?>)) @@ -94,9 +95,9 @@ metadataField = do P.skipMany1 inlineSpace <?> "space followed by metadata for: " ++ key value <- P.manyTill P.anyChar newline trailing' <- P.many trailing - return (key, trim $ value ++ concat trailing') + return (key, trim $ value ++ intercalate " " trailing') where - trailing = (++) <$> P.many1 inlineSpace <*> P.manyTill P.anyChar newline + trailing = P.many1 inlineSpace *> P.manyTill P.anyChar newline -------------------------------------------------------------------------------- |