mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-29 01:41:20 +08:00
42a7b80c04
Incorrect types to pandoc element constructors are automatically converted to the correct types when possible. This was already done for most constructors, but conversions are now also done for nested types (like lists of lists).
11 lines
366 B
Lua
11 lines
366 B
Lua
-- Test that constructors are "smart" in that they autoconvert
|
|
-- types where sensible.
|
|
function Para (_)
|
|
return {
|
|
pandoc.BulletList{pandoc.Para "Hello", pandoc.Para "World"},
|
|
pandoc.DefinitionList{{"foo", pandoc.Para "placeholder"}},
|
|
pandoc.LineBlock{"Moin", "Welt"},
|
|
pandoc.OrderedList{pandoc.Plain{pandoc.Str "one"}, pandoc.Plain "two"}
|
|
}
|
|
end
|