packages feed

gitit 0.12.2 → 0.12.2.1

raw patch · 7 files changed

+56/−19 lines, 7 filesdep ~aesondep ~blaze-htmldep ~pandocPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aeson, blaze-html, pandoc, time

API changes (from Hackage documentation)

Files

CHANGES view
@@ -1,3 +1,11 @@+Version 0.12.2.1 released 14 Feb 2017++  * Bump version bounds for time, pandoc, blaze-html, aeson.+  * Added MTable plugin (Simon Heath).+    Adds simple but easy-to-use variable-width table syntax.+  * Fixed Subst plugin (Simon Heath, #548).+  * Fixed Dot plugin (Simon Heath, #568).+ Version 0.12.2 released 09 Nov 2016    * Allow pandoc 1.18, tagsoup 0.14, aeson, 1.x.
gitit.cabal view
@@ -1,5 +1,5 @@ name:                gitit-version:             0.12.2+version:             0.12.2.1 Cabal-version:       >= 1.8 build-type:          Simple synopsis:            Wiki using happstack, git or darcs, and pandoc.@@ -139,7 +139,7 @@                      directory,                      mtl,                      old-time,-                     pandoc >= 1.12.4 && < 1.19,+                     pandoc >= 1.12.4 && < 1.20,                      pandoc-types >= 1.12.3 && < 1.18,                      highlighting-kate >= 0.5.0.1 && < 0.7,                      bytestring,@@ -150,7 +150,7 @@                      HTTP >= 4000.0 && < 4000.4,                      HStringTemplate >= 0.6 && < 0.9,                      old-locale >= 1,-                     time >= 1.1 && < 1.7,+                     time >= 1.1 && < 1.8,                      recaptcha >= 0.1,                      filestore >= 0.6 && < 0.7,                      zlib >= 0.5 && < 0.7,@@ -163,14 +163,14 @@                      feed >= 0.3.6 && < 0.4,                      xss-sanitize >= 0.3 && < 0.4,                      tagsoup >= 0.13 && < 0.15,-                     blaze-html >= 0.4 && < 0.9,+                     blaze-html >= 0.4 && < 0.10,                      json >= 0.4 && < 0.10,                      uri >= 0.1 && < 0.2,                      split,                      hoauth2 >= 0.4.2 && < 0.6,                      http-conduit >= 2.1.4 && < 2.3,                      http-client-tls >= 0.2.2 && < 0.4,-                     aeson >= 0.7 && < 1.1,+                     aeson >= 0.7 && < 1.2,                      uuid >= 1.3 && < 1.4   if impl(ghc >= 6.10)     build-depends:   base >= 4, syb
plugins/Dot.hs view
@@ -33,8 +33,9 @@   liftIO $ do     (ec, _out, err) <- readProcessWithExitCode "dot" ["-Tpng", "-o",                          staticDir cfg </> "img" </> outfile] contents+    let attr = ("image", [], [])     if ec == ExitSuccess-       then return $ Para [Image name ("/img" </> outfile, "")]+       then return $ Para [Image attr name ("/img" </> outfile, "")]        else error $ "dot returned an error status: " ++ err transformBlock x = return x 
plugins/Subst.hs view
@@ -8,7 +8,8 @@  module Subst (plugin) where -import "MonadCatchIO-mtl" Control.Monad.CatchIO (try)+--import "MonadCatchIO-mtl" Control.Monad.CatchIO (try)+import Control.Monad.Catch (try) import Data.FileStore (FileStoreError, retrieve) import Text.Pandoc (def, readMarkdown) import Network.Gitit.ContentTransformer (inlinesToString)@@ -19,7 +20,7 @@ plugin = mkPageTransformM substituteIntoBlock  substituteIntoBlock :: [Block] -> PluginM [Block]-substituteIntoBlock ((Para [Link ref ("!subst", _)]):xs) =+substituteIntoBlock ((Para [Link attr ref ("!subst", _)]):xs) =      do let target = inlinesToString ref         cfg <- askConfig         let fs = filestoreFromConfig cfg@@ -27,9 +28,16 @@         case article :: Either FileStoreError String of           Left  _    -> let txt = Str ("[" ++ target ++ "](!subst)")                             alt = "'" ++ target ++ "' doesn't exist. Click here to create it."-                            lnk = Para [Link [txt] (target,alt)]+                            lnk = Para [Link attr [txt] (target,alt)]                         in  (lnk :) `fmap` substituteIntoBlock xs-          Right a    -> let (Pandoc _ content) = readMarkdown def a-                        in  (content ++) `fmap` substituteIntoBlock xs+          -- Right a    -> let (Pandoc _ content) = readMarkdown def a+          --               in  (content ++) `fmap` substituteIntoBlock xs++          Right a    -> case readMarkdown def a of+              Left err -> +                let content = [Para $ [Str "Error parsing markdown in subst?"]] in+                (content ++) `fmap` substituteIntoBlock xs+              Right (Pandoc _ content) -> (content ++) `fmap` substituteIntoBlock xs+ substituteIntoBlock (x:xs) = (x:) `fmap` substituteIntoBlock xs substituteIntoBlock [] = return []
src/Network/Gitit/ContentTransformer.hs view
@@ -529,11 +529,16 @@   toc <- liftM ctxTOC get   bird <- liftM ctxBirdTracks get   cfg <- lift getConfig+  let tpl = "$if(toc)$<div id=\"TOC\">\n$toc$\n</div>\n$endif$\n$body$"   return $ primHtml $ T.unpack .            (if xssSanitize cfg then sanitizeBalance else id) . T.pack $            writeHtmlString def{+#if MIN_VERSION_pandoc(1,19,0)+                        writerTemplate = Just tpl+#else                         writerStandalone = True-                      , writerTemplate = "$if(toc)$<div id=\"TOC\">\n$toc$\n</div>\n$endif$\n$body$"+                      , writerTemplate = tpl+#endif                       , writerHTMLMathMethod =                             case mathMethod cfg of                                  MathML -> Pandoc.MathML Nothing
src/Network/Gitit/Export.hs view
@@ -48,7 +48,7 @@ import Paths_gitit (getDataFileName)  defaultRespOptions :: WriterOptions-defaultRespOptions = def { writerStandalone = True, writerHighlight = True }+defaultRespOptions = def { writerHighlight = True }  respond :: String         -> String@@ -73,7 +73,13 @@   doc' <- if ext `elem` ["odt","pdf","beamer","epub","docx","rtf"]              then fixURLs page doc              else return doc-  respond mimetype ext (fn opts{writerTemplate = template+  respond mimetype ext (fn opts{+#if MIN_VERSION_pandoc(1,19,0)+                                writerTemplate = Just template+#else+                                writerTemplate = template+                               ,writerStandalone = True+#endif                                ,writerUserDataDir = pandocUserData cfg})           page doc' @@ -102,8 +108,7 @@     -- needed for the slides.)  We then pass the body into the     -- slide template using the 'body' variable.     Pandoc meta blocks <- fixURLs page doc-    let body' = writeHtmlString opts'{writerStandalone = False}-                   (Pandoc meta blocks) -- just body+    let body' = writeHtmlString opts' (Pandoc meta blocks) -- just body     let body'' = T.unpack                $ (if xssSanitize cfg then sanitizeBalance else id)                $ T.pack body'@@ -128,7 +133,12 @@     let opts'' = opts'{                 writerVariables =                   ("body",body''):("dzslides-core",dzcore):("highlighting-css",pygmentsCss):variables'+#if MIN_VERSION_pandoc(1,19,0)+               ,writerTemplate = Just template+#else                ,writerTemplate = template+               ,writerStandalone = True+#endif                ,writerUserDataDir = pandocUserData cfg                }     let h = writeHtmlString opts'' (Pandoc meta [])@@ -239,7 +249,13 @@               template  <- liftIO $ either throwIO return template'               let toc = tableOfContents cfg               res <- liftIO $ makePDF "pdflatex" writeLaTeX-                         defaultRespOptions{writerTemplate = template+                         defaultRespOptions{+#if MIN_VERSION_pandoc(1,19,0)+                                            writerTemplate = Just template+#else+                                            writerTemplate = template+                                           ,writerStandalone = True+#endif                                            ,writerSourceURL = Just $ baseUrl cfg                                            ,writerTableOfContents = toc                                            ,writerBeamer = useBeamer} pndc
src/Network/Gitit/Initialize.hs view
@@ -127,8 +127,7 @@     let fs = filestoreFromConfig conf         pt = defaultPageType conf         toPandoc = handleError . readMarkdown def{ readerSmart = True }-        defOpts = def{ writerStandalone = False-                     , writerHTMLMathMethod = JsMath+        defOpts = def{ writerHTMLMathMethod = JsMath                               (Just "/js/jsMath/easy/load.js")                      , writerExtensions = if showLHSBirdTracks conf                                              then Set.insert