pandoc.lua: define default list attributes

The second argument of the OrderedList constructor, which should define
the list's attributes, is made optional. Default attributes are used if
the parameter is omitted.
This commit is contained in:
Albert Krewinkel 2017-10-25 16:41:03 +02:00
parent 50275957ff
commit db715dc9d7
No known key found for this signature in database
GPG key ID: 388DC0B21F631124

View file

@ -315,7 +315,8 @@ M.Null = M.Block:create_constructor(
M.OrderedList = M.Block:create_constructor(
"OrderedList",
function(items, listAttributes)
return {c = {listAttributes,items}}
listAttributes = listAttributes or {1, M.DefaultStyle, M.DefaultDelim}
return {c = {listAttributes, items}}
end,
{{"start", "style", "delimiter"}, "content"}
)