aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-11-02 17:25:47 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2021-11-02 17:25:47 +0100
commitb26f950ccaa0a1a973b282a516bd80295536feb2 (patch)
tree1066b528ff7a14325b7b7402953e8f39c92e984f /src
parentc467f0fed109c362faa733c1a258a26bc6aba5cd (diff)
downloadpandoc-b26f950ccaa0a1a973b282a516bd80295536feb2.tar.gz
Lua: display Attr values using their native Haskell representation
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/Attr.hs4
1 files changed, 4 insertions, 0 deletions
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)