BlogLiterately 0.8.1.3 → 0.8.1.4
raw patch · 4 files changed
+15/−13 lines, 4 filesdep ~pandocdep ~pandoc-citeprocdep ~pandoc-typesPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: pandoc, pandoc-citeproc, pandoc-types
API changes (from Hackage documentation)
Files
- BlogLiterately.cabal +4/−4
- CHANGES.md +5/−0
- src/Text/BlogLiterately/Image.hs +3/−3
- src/Text/BlogLiterately/Transform.hs +3/−6
BlogLiterately.cabal view
@@ -1,5 +1,5 @@ Name: BlogLiterately-Version: 0.8.1.3+Version: 0.8.1.4 Synopsis: A tool for posting Haskelly articles to blogs Description: Write blog posts in Markdown format, then use BlogLiterately to do syntax highlighting, format ghci sessions, and upload@@ -57,9 +57,9 @@ blaze-html >= 0.5 && < 0.9, cmdargs >= 0.9.5 && < 0.11, haxr >= 3000.11 && < 3000.12,- pandoc >= 1.14 && < 1.16,- pandoc-types >= 1.12 && < 1.13,- pandoc-citeproc >= 0.1.2 && < 0.9,+ pandoc >= 1.14 && < 1.17,+ pandoc-types >= 1.16 && < 1.17,+ pandoc-citeproc >= 0.1.2 && < 0.10, highlighting-kate >= 0.5 && < 0.7, data-default >= 0.5 && < 0.6, lens >= 3.8 && < 4.14
CHANGES.md view
@@ -1,3 +1,8 @@+0.8.1.4 (5 January 2016)+------------------------++ * Require `pandoc-1.16`+ 0.8.1.3 (14 October 2015) -------------------------
src/Text/BlogLiterately/Image.hs view
@@ -55,17 +55,17 @@ _ -> return p where uploadOneImage :: String -> Inline -> StateT (M.Map FilePath URL) IO Inline- uploadOneImage xmlrpc i@(Image altText (imgUrl, imgTitle))+ uploadOneImage xmlrpc i@(Image attr altText (imgUrl, imgTitle)) | isLocal imgUrl = do uploaded <- get case M.lookup imgUrl uploaded of- Just url -> return $ Image altText (url, imgTitle)+ Just url -> return $ Image attr altText (url, imgTitle) Nothing -> do res <- lift $ uploadIt xmlrpc imgUrl bl case res of Just (ValueStruct (lookup "url" -> Just (ValueString newUrl))) -> do modify (M.insert imgUrl newUrl)- return $ Image altText (newUrl, imgTitle)+ return $ Image attr altText (newUrl, imgTitle) _ -> do liftIO . putStrLn $ "Warning: upload of " ++ imgUrl ++ " failed." return i
src/Text/BlogLiterately/Transform.hs view
@@ -176,7 +176,7 @@ centerImages = bottomUp centerImage where centerImage :: [Block] -> [Block]- centerImage (img@(Para [Image _altText (_imgUrl, _imgTitle)]) : bs) =+ centerImage (img@(Para [Image _attr _altText (_imgUrl, _imgTitle)]) : bs) = RawBlock "html" "<div style=\"text-align: center;\">" : img : RawBlock "html" "</div>"@@ -206,13 +206,10 @@ optionsXF = Transform optionsXF' (const True) where optionsXF' = do- p <- gets snd- let (errs, opts) = queryWith extractOptions p+ (errs, opts) <- queryWith extractOptions <$> gets snd mapM_ (liftIO . print) errs _1 %= (<> opts)-- let p' = bottomUp killOptionBlocks p- _2 .= p'+ _2 %= bottomUp killOptionBlocks -- | Take a block and extract from it a list of parse errors and an -- options record. If the blog is not tagged with @[BLOpts]@ these