diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -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).
diff --git a/commonmark-pandoc.cabal b/commonmark-pandoc.cabal
--- a/commonmark-pandoc.cabal
+++ b/commonmark-pandoc.cabal
@@ -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.
diff --git a/src/Commonmark/Pandoc.hs b/src/Commonmark/Pandoc.hs
--- a/src/Commonmark/Pandoc.hs
+++ b/src/Commonmark/Pandoc.hs
@@ -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
