hakyll 4.9.1.0 → 4.9.2.0
raw patch · 4 files changed
+11/−4 lines, 4 filesdep ~pandocPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: pandoc
API changes (from Hackage documentation)
Files
- hakyll.cabal +3/−3
- src/Data/Yaml/Extended.hs +5/−1
- tests/Hakyll/Web/Template/Tests.hs +1/−0
- tests/data/example.md.metadata +2/−0
hakyll.cabal view
@@ -1,5 +1,5 @@ Name: hakyll-Version: 4.9.1.0+Version: 4.9.2.0 Synopsis: A static website compiler library Description:@@ -164,7 +164,7 @@ mtl >= 1 && < 2.3, network >= 2.6 && < 2.7, network-uri >= 2.6 && < 2.7,- pandoc >= 1.14 && < 1.19,+ pandoc >= 1.14 && < 1.20, pandoc-citeproc >= 0.4 && < 0.11, parsec >= 3.0 && < 3.2, process >= 1.0 && < 1.5,@@ -257,7 +257,7 @@ mtl >= 1 && < 2.3, network >= 2.6 && < 2.7, network-uri >= 2.6 && < 2.7,- pandoc >= 1.14 && < 1.19,+ pandoc >= 1.14 && < 1.20, pandoc-citeproc >= 0.4 && < 0.11, parsec >= 3.0 && < 3.2, process >= 1.0 && < 1.5,
src/Data/Yaml/Extended.hs view
@@ -7,12 +7,16 @@ import qualified Data.Text as T import qualified Data.Vector as V import Data.Yaml+import Data.Scientific toString :: Value -> Maybe String toString (String t) = Just (T.unpack t) toString (Bool True) = Just "true" toString (Bool False) = Just "false"-toString (Number d) = Just (show d)+-- | Make sure that numeric fields containing integer numbers are shown as+-- | integers (i.e., "42" instead of "42.0").+toString (Number d) | isInteger d = Just (formatScientific Fixed (Just 0) d)+ | otherwise = Just (show d) toString _ = Nothing toList :: Value -> Maybe [Value]
tests/Hakyll/Web/Template/Tests.hs view
@@ -29,6 +29,7 @@ tests = testGroup "Hakyll.Core.Template.Tests" $ concat [ [ testCase "case01" $ test ("template.html.out", "template.html", "example.md") , testCase "case02" $ test ("strip.html.out", "strip.html", "example.md")+ , testCase "case03" $ test ("just-meta.html.out", "just-meta.html", "example.md") , testCase "applyJoinTemplateList" testApplyJoinTemplateList ]
tests/data/example.md.metadata view
@@ -1,3 +1,5 @@ external: External data date: 2012-10-22 14:35:24 subblog: food+intfield: 42+numfield: 3.14