diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2018-10-15 21:00:50 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2018-10-15 21:00:50 +0200 |
commit | a444321be87da3cba36c737995cd1590fa644e8b (patch) | |
tree | d091b7f5e171bc552dd620a6b0c6f30707090760 /data | |
parent | d04ded4ca999e9488128e1b85e1566fca3ef3a48 (diff) | |
download | pandoc-a444321be87da3cba36c737995cd1590fa644e8b.tar.gz |
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.
Diffstat (limited to 'data')
-rw-r--r-- | data/pandoc.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/data/pandoc.lua b/data/pandoc.lua index 1e2d2a061..dc09c85f8 100644 --- a/data/pandoc.lua +++ b/data/pandoc.lua @@ -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 |