diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,8 +1,13 @@
 # Changelog for commonmark-pandoc
 
+## 0.3.0.2
+
+  * Fix class attribute so that it is split on spaces and multiple
+    classes added to pandoc Attr.
+
 ## 0.3.0.1
 
-  * keep task-list checkbox attached under source positions.
+  * Keep task-list checkbox attached under source positions.
     With sourcepos enabled, an item's first Plain/Para has already been
     wrapped in a Div (wrapper="1") by addBlockAttrs before taskList runs,
     so toTaskListItem's Plain/Para patterns never matched and the
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.3.0.1
+version:        0.3.0.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
@@ -235,7 +235,7 @@
   go ("id", v) (_, cls, kvs) = (v, cls, kvs)
   go ("class", v) (ident, cls, kvs)
     | v `elem` cls           = (ident, cls, kvs)
-    | otherwise              = (ident, v:cls, kvs)
+    | otherwise              = (ident, T.words v <> cls, kvs)
   go (k, v) (ident, cls, kvs)
     | k `elem` map fst kvs   = (ident, cls, kvs)
     | otherwise              = (ident, cls, (k,v):kvs)
