commonmark-pandoc 0.2.1.1 → 0.2.1.2
raw patch · 3 files changed
+9/−6 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- changelog.md +7/−0
- commonmark-pandoc.cabal +1/−1
- src/Commonmark/Pandoc.hs +1/−5
changelog.md view
@@ -1,5 +1,12 @@ # Changelog for commonmark-pandoc +## 0.2.1.2++- Fix addition of sourcepos attributes to blocks (jgm/pandoc#7769).+ We were always adding an enclosing Div, even when the block+ admits attributes. Now the attributes are added to the block+ itself, unless it can't accept attributes (as with inlines).+ ## 0.2.1.1 - Don't collapse Para to Plain in task lists (#77).
commonmark-pandoc.cabal view
@@ -1,5 +1,5 @@ name: commonmark-pandoc-version: 0.2.1.1+version: 0.2.1.2 synopsis: Bridge between commonmark and pandoc AST. description: This library provides typeclasses for rendering commonmark to Pandoc types.
src/Commonmark/Pandoc.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}@@ -35,9 +34,6 @@ import Commonmark.Extensions.Smart import Data.Char (isSpace) import Data.Coerce (coerce)-#if !MIN_VERSION_base(4,11,0)-import Data.Semigroup (Semigroup, (<>))-#endif newtype Cm b a = Cm { unCm :: a } deriving (Show, Semigroup, Monoid)@@ -108,7 +104,7 @@ ranged _r x = x instance Rangeable (Cm SourceRange B.Blocks) where- ranged r x = B.divWith ("",[],[("data-pos",T.pack (show r))]) <$> x+ ranged r = addAttributes [("data-pos", T.pack (show r))] instance HasMath (Cm b B.Inlines) where inlineMath t = Cm $ B.math t