commonmark-pandoc 0.2.2.1 → 0.2.2.2
raw patch · 3 files changed
+12/−5 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 +4/−4
changelog.md view
@@ -1,5 +1,12 @@ # Changelog for commonmark-pandoc +## 0.2.2.2++- Add wrapper="1" when we need to add Div or Span. This is needed for+ good round-tripping; a djot writer can see that this attribute+ was added and remove the wrapping, adding the attributes directly+ to the element.+ ## 0.2.2.1 - Remove nested footnotes (#138).
commonmark-pandoc.cabal view
@@ -1,5 +1,5 @@ name: commonmark-pandoc-version: 0.2.2.1+version: 0.2.2.2 synopsis: Bridge between commonmark and pandoc AST. description: This library provides typeclasses for rendering commonmark to Pandoc types.
src/Commonmark/Pandoc.hs view
@@ -206,8 +206,8 @@ Table (addToPandocAttr attrs curattrs) capt colspecs thead tbody tfoot addBlockAttrs attrs (Div curattrs bs) = Div (addToPandocAttr attrs curattrs) bs-addBlockAttrs attrs x =- Div (addToPandocAttr attrs nullAttr) [x]+addBlockAttrs attrs x = -- add wrapper="1" if we needed to add a Div+ Div (addToPandocAttr (("wrapper","1"):attrs) nullAttr) [x] addInlineAttrs :: [(T.Text, T.Text)] -> Inline -> Inline addInlineAttrs attrs (Link curattrs ils target) =@@ -218,8 +218,8 @@ Span (addToPandocAttr attrs curattrs) ils addInlineAttrs attrs (Code curattrs s) = Code (addToPandocAttr attrs curattrs) s-addInlineAttrs attrs x =- Span (addToPandocAttr attrs nullAttr) [x]+addInlineAttrs attrs x = -- add wrapper="1" if we needed to add a Span+ Span (addToPandocAttr (("wrapper","1"):attrs) nullAttr) [x] addToPandocAttr :: Attributes -> Attr -> Attr addToPandocAttr attrs attr = foldr go attr attrs