git.iko.soy/typeable/pandoc
on master help sign in
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.

commitdb715dc9d79c49493ddb19f29d98790abb474b49 authorAlbert Krewinkel <albert@zeitkraut.de> dateWed 25 Oct 2017, 16:41 (9 years ago) parent5027595
1 file changed+2−1
data/pandoc.lua+2−1
data/pandoc.lua+2−1
@@ -315,7 +315,8 @@ M.Null = M.Block:create_constructor(
315315M.OrderedList = M.Block:create_constructor(
316316 "OrderedList",
317317 function(items, listAttributes)
318− return {c = {listAttributes,items}}
318+ listAttributes = listAttributes or {1, M.DefaultStyle, M.DefaultDelim}
319+ return {c = {listAttributes, items}}
319320 end,
320321 {{"start", "style", "delimiter"}, "content"}
321322)