Lua pandoc module: fix MetaList constructor
Passing a MetaList object to the constructor `pandoc.MetaList` now returns the passed list as a MetaList. This is consistent with the constructor behavior when passed an (untagged) list. Previously, the constructor used to create a new MetaList with the passed MetaList as its only element.
This commit is contained in:
parent
d04ded4ca9
commit
a444321be8
1 changed files with 6 additions and 1 deletions
|
@ -267,7 +267,12 @@ M.MetaInlines = M.MetaValue:create_constructor(
|
|||
-- @tparam {MetaValue,...} meta_values list of meta values
|
||||
M.MetaList = M.MetaValue:create_constructor(
|
||||
'MetaList',
|
||||
function (content) return ensureList(content) end
|
||||
function (content)
|
||||
if content.tag == 'MetaList' then
|
||||
return content
|
||||
end
|
||||
return ensureList(content)
|
||||
end
|
||||
)
|
||||
|
||||
--- Meta map
|
||||
|
|
Loading…
Add table
Reference in a new issue