diff --git a/spec/Main.hs b/spec/Main.hs index dc91e3a..663e7fa 100644 --- a/spec/Main.hs +++ b/spec/Main.hs @@ -223,7 +223,7 @@ larcenyFillTests = do describe "" $ it "should show the title, id, and excerpt" $ do "" `shouldRender` "Foo bar" - "" `shouldRender` "1.0" + "" `shouldRender` "1" "" `shouldRender` "summary" describe "" $ it "should show the content" $ diff --git a/src/Web/Offset/Splices.hs b/src/Web/Offset/Splices.hs index 98828cb..4269881 100644 --- a/src/Web/Offset/Splices.hs +++ b/src/Web/Offset/Splices.hs @@ -215,7 +215,9 @@ postSubs extra object = subs (map (buildSplice object) (mergeFields postFields e traverseObject pth o = foldl (\o x -> unObj . M.lookup x $ o) o pth getText n o = case M.lookup n o of Just (String t) -> t - Just (Number i) -> T.pack $ show i + Just (Number i) -> case floatingOrInteger i of + Right r -> tshow r + Left i -> tshow i _ -> "" -- * -- Internal -- * --