packages feed

BlogLiterately 0.8.2.3 → 0.8.3

raw patch · 6 files changed

+43/−6 lines, 6 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Text.BlogLiterately.Options: [_litHaskell] :: BlogLiterately -> Maybe Bool
+ Text.BlogLiterately.Options: litHaskell :: Lens' BlogLiterately (Maybe Bool)
+ Text.BlogLiterately.Options: litHaskell' :: BlogLiterately -> Bool
- Text.BlogLiterately.Options: BlogLiterately :: Maybe String -> Maybe HsHighlight -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe String -> Maybe Bool -> Maybe Bool -> [String] -> [String] -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> [String] -> BlogLiterately
+ Text.BlogLiterately.Options: BlogLiterately :: Maybe String -> Maybe HsHighlight -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe String -> Maybe Bool -> Maybe Bool -> [String] -> [String] -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe Bool -> Maybe Bool -> Maybe Bool -> Maybe Bool -> [String] -> BlogLiterately

Files

BlogLiterately.cabal view
@@ -1,5 +1,5 @@ Name:           BlogLiterately-Version:        0.8.2.3+Version:        0.8.3 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@@ -21,7 +21,7 @@ License:        GPL License-file:   LICENSE Category:       Web-Copyright:      Copyright (c) Robert Greayer 2008-2010, Brent Yorgey 2012-2013+Copyright:      Copyright (c) Robert Greayer 2008-2010, Brent Yorgey 2012-2016 Author:         Robert Greayer <robgreayer@yahoo.com>, Brent Yorgey Maintainer:     Brent Yorgey <byorgey@gmail.com> Stability:      experimental
CHANGES.md view
@@ -1,3 +1,10 @@+0.8.3 (25 May 2016)+-------------------++  * Add `--[no-]lit-haskell` flags, to enable/disable processing of+    markdown files as literate Haskell. See+    [#29](https://github.com/byorgey/BlogLiterately/issues/29).+ 0.8.2.3 (9 May 2016) -------------------- 
doc/BlogLiteratelyDoc.lhs view
@@ -73,6 +73,14 @@ [supports a few extensions](http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown) to the basic format. +By default, `BlogLiterately` assumes that markdown files should be+parsed as if they contain literate Haskell code.  To disable+processing of markdown files with literate Haskell extensions, use the+`--no-lit-haskell` command-line argument.  This makes a difference,+for example, when processing paragraphs set off by "bird tracks"+(*i.e.* leading `>` characters): in literate Haskell, these are code+blocks, whereas in plain markdown they are blockquotes.+ Determining input format ------------------------ 
src/Text/BlogLiterately/Options.hs view
@@ -23,6 +23,7 @@     , style     , hsHighlight     , otherHighlight+    , litHaskell     , toc     , wplatex     , math@@ -51,6 +52,7 @@     , style'     , hsHighlight'     , otherHighlight'+    , litHaskell'     , toc'     , wplatex'     , math'@@ -89,6 +91,7 @@   , _hsHighlight    :: Maybe HsHighlight   -- ^ Haskell highlighting mode   , _otherHighlight :: Maybe Bool          -- ^ Use highlighting-kate for                                            --   non-Haskell?+  , _litHaskell     :: Maybe Bool          -- ^ Parse as literate Haskell?   , _toc            :: Maybe Bool          -- ^ Generate a table of contents?   , _wplatex        :: Maybe Bool          -- ^ Format LaTeX for WordPress?   , _math           :: Maybe String        -- ^ Indicate how to format math@@ -133,6 +136,7 @@     { _style          = Nothing     , _hsHighlight    = Nothing     , _otherHighlight = Nothing+    , _litHaskell     = Nothing     , _toc            = Nothing     , _wplatex        = Nothing     , _math           = Nothing@@ -161,6 +165,7 @@     { _style          = combine _style     , _hsHighlight    = combine _hsHighlight     , _otherHighlight = combine _otherHighlight+    , _litHaskell     = combine _litHaskell     , _toc            = combine _toc     , _wplatex        = combine _wplatex     , _math           = combine _math@@ -202,6 +207,9 @@ otherHighlight' :: BlogLiterately -> Bool otherHighlight' = fromMaybe True  . view otherHighlight +litHaskell' :: BlogLiterately -> Bool+litHaskell' = fromMaybe True . view litHaskell+ toc' :: BlogLiterately -> Bool toc'            = fromMaybe False . view toc @@ -292,18 +300,28 @@        ]      , _toc = enum        [ Nothing-         &= explicit          &= name "no-toc"          &= help "don't generate a table of contents (default)"-       , Just True          &= explicit+       , Just True          &= name "toc"          &= help "generate a table of contents"+         &= explicit        ]      , _wplatex = def &= help "reformat inline LaTeX the way WordPress expects"                   &= name "wplatex" &= name "w" &= explicit      , _math    = def &= help "how to layout math, where --math=<pandoc-option>[=URL]"                   &= name "math" &= name "m" &= explicit+     , _litHaskell = enum+        [ Nothing+          &= help "parse as literate Haskell (default)"+          &= name "lit-haskell"+          &= explicit+        , Just False+          &= help "do not parse as literate Haskell"+          &= name "no-lit-haskell"+          &= explicit+        ]      , _ghci    = def &= help "run [ghci] blocks through ghci and include output"                   &= name "ghci" &= name "g" &= explicit      , _uploadImages = def &= name "upload-images" &= name "I" &= explicit &= help "upload local images"
src/Text/BlogLiterately/Options/Parse.hs view
@@ -55,6 +55,7 @@   <|> parseField toc          "toc"           parseBool   <|> parseField wplatex      "wplatex"       parseBool   <|> parseField math         "math"          parseStr+  <|> parseField litHaskell   "lit-haskell"   parseBool   <|> parseField ghci         "ghci"          parseBool   <|> parseField uploadImages "upload-images" parseBool   <|> parseField categories   "categories"    parseStrList
src/Text/BlogLiterately/Transform.hs view
@@ -501,8 +501,11 @@             _       -> readMarkdown opts      parseOpts = def-                { readerExtensions = Ext_literate_haskell-                                     `S.insert` readerExtensions def+                { readerExtensions =+                    case bl^.litHaskell of+                      Just False -> readerExtensions def+                      _          -> S.insert Ext_literate_haskell+                                    (readerExtensions def)                 , readerSmart      = True                 }     writeOpts bl = def