In the pandoc introduction to filters the following code is presented as an "example of a Lua filter":
return {
{
Strong = function (elem)
return pandoc.SmallCaps(elem.c)
end,
}
}
I have never seen a standalone return statement in Lua as shown in the example above. Furthermore I cannot see this syntax documented anywhere in the official reference.
Could anyone please let me know the following:
- Whether this is valid Lua?
- Where it is documented in the Lua docs?