Lua: display Attr values using their native Haskell representation

This commit is contained in:
Albert Krewinkel 2021-11-02 17:25:47 +01:00
parent c467f0fed1
commit b26f950cca
No known key found for this signature in database
GPG key ID: 388DC0B21F631124
2 changed files with 7 additions and 3 deletions

View file

@ -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)

View file

@ -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' {