mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-20 07:16:40 +00:00
It is now possible to return a single filter from a filter file, e.g.
``` lua
-- Switch single- and double quotes
return {
Quoted = function (q)
elem.quotetype = elem.quotetype == 'SingleQuote'
and 'DoubleQuote' or 'SingleQuote'
return elem
end
}
The filter must not contain numerical indexes, or it might be treated as
a list of filters.
9 lines
162 B
Lua
9 lines
162 B
Lua
return {
|
|
Quoted = function (elem)
|
|
if elem.quotetype == "SingleQuote" then
|
|
elem.quotetype = "DoubleQuote"
|
|
end
|
|
return elem
|
|
end,
|
|
}
|