pandoc-plot 1.5.2 → 1.5.3
raw patch · 4 files changed
+10/−4 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- pandoc-plot.cabal +1/−1
- src/Text/Pandoc/Filter/Plot/Renderers.hs +3/−1
- src/Text/Pandoc/Filter/Plot/Renderers/Matplotlib.hs +2/−2
CHANGELOG.md view
@@ -2,6 +2,10 @@ pandoc-plot uses [Semantic Versioning](http://semver.org/spec/v2.0.0.html) +## Release 1.5.3++* Fixed an issue where the `tight_bbox` option for Matplotlib plots was ignored (#48)+ ## Release 1.5.2 * Overhauled the way executables are handled. This fixes an issue where executables specified in documents (rather than configuration) were ignored (#46).
pandoc-plot.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: pandoc-plot-version: 1.5.2+version: 1.5.3 synopsis: A Pandoc filter to include figures generated from code blocks using your plotting toolkit of choice. description: A Pandoc filter to include figures generated from code blocks. Keep the document and code in the same location. Output is
src/Text/Pandoc/Filter/Plot/Renderers.hs view
@@ -120,7 +120,9 @@ -- | Parse code block headers for extra attributes that are specific -- to this renderer. By default, no extra attributes are parsed. parseExtraAttrs :: Toolkit -> Map Text Text -> Map Text Text-parseExtraAttrs Matplotlib = M.filterWithKey (\k _ -> k `elem` ["tight_bbox", "transparent"])+parseExtraAttrs Matplotlib = M.filterWithKey (\k _ -> k `elem` [ pack $ show MatplotlibTightBBoxK+ , pack $ show MatplotlibTransparentK+ ]) parseExtraAttrs _ = return mempty -- | List of toolkits available on this machine.
src/Text/Pandoc/Filter/Plot/Renderers/Matplotlib.hs view
@@ -60,8 +60,8 @@ |] where attrs = M.fromList extraAttrs- tight_ = readBool $ M.findWithDefault "False" "tight" attrs- transparent_ = readBool $ M.findWithDefault "False" "transparent" attrs+ tight_ = readBool $ M.findWithDefault "False" (T.pack $ show MatplotlibTightBBoxK) attrs+ transparent_ = readBool $ M.findWithDefault "False" (T.pack $ show MatplotlibTransparentK) attrs tightBox = if tight_ then ("'tight'" :: Text) else ("None" :: Text) transparent = if transparent_ then ("True" :: Text) else ("False" :: Text)