aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-10-31 11:12:53 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2021-10-31 11:15:50 +0100
commit3de8f4fdc552c7ba103ec30ef79ea42ec674a8cc (patch)
tree6425971fb7f0a95adde35030d80045ccc2260de0 /test
parent40655b54a2273371c77230dfe835e8789c06d409 (diff)
downloadpandoc-3de8f4fdc552c7ba103ec30ef79ea42ec674a8cc.tar.gz
Lua: re-add `content` property to Link elements
This was a regression introduced in version 2.15. Fixes: #7647
Diffstat (limited to 'test')
-rw-r--r--test/lua/module/pandoc.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lua/module/pandoc.lua b/test/lua/module/pandoc.lua
index 6e8257633..b18a01faa 100644
--- a/test/lua/module/pandoc.lua
+++ b/test/lua/module/pandoc.lua
@@ -148,6 +148,16 @@ return {
end)
}
},
+ group "Inline elements" {
+ test('Link has property `content`', function ()
+ local link = pandoc.Link('example', 'https://example.org')
+ assert.are_same(link.content, {pandoc.Str 'example'})
+
+ link.content = 'commercial'
+ link.target = 'https://example.com'
+ assert.are_equal(link, pandoc.Link('commercial', 'https://example.com'))
+ end)
+ },
group "Block elements" {
group "BulletList" {
test('access items via property `content`', function ()