Lua: re-add content property to Link elements

This was a regression introduced in version 2.15.

Fixes: #7647
This commit is contained in:
Albert Krewinkel
2021-10-31 11:15:50 +01:00
parent 40655b54a2
commit 3de8f4fdc5
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -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 ()