diff --git a/src/Text/Pandoc/Lua/Marshaling/Attr.hs b/src/Text/Pandoc/Lua/Marshaling/Attr.hs
index a38bc6ec7..97e702e35 100644
--- a/src/Text/Pandoc/Lua/Marshaling/Attr.hs
+++ b/src/Text/Pandoc/Lua/Marshaling/Attr.hs
@@ -42,6 +42,10 @@ typeAttr = deftype "Attr"
     <#> parameter peekAttr "a1" "Attr" ""
     <#> parameter peekAttr "a2" "Attr" ""
     =#> functionResult pushBool "boolean" "whether the two are equal"
+  , operation Tostring $ lambda
+    ### liftPure show
+    <#> parameter peekAttr "Attr" "attr" ""
+    =#> functionResult pushString "string" "native Haskell representation"
   ]
   [ property "identifier" "element identifier"
       (pushText, \(ident,_,_) -> ident)
diff --git a/test/lua/module/pandoc.lua b/test/lua/module/pandoc.lua
index 057d24202..9f5f5c771 100644
--- a/test/lua/module/pandoc.lua
+++ b/test/lua/module/pandoc.lua
@@ -185,10 +185,10 @@ return {
       end),
       test('has property `text`', function ()
         local code = pandoc.Code('true')
-        -- assert.are_equal(code.text, 'true')
+        assert.are_equal(code.text, 'true')
 
-        -- code.text = '1 + 1'
-        -- assert.are_equal(pandoc.Code('1 + 1'), code)
+        code.text = '1 + 1'
+        assert.are_equal(pandoc.Code('1 + 1'), code)
       end),
     },
     group 'Link' {