This website requires JavaScript.
Explore
Help
Sign in
Tissevert
/
pandoc
Watch
1
Star
0
Fork
You've already forked pandoc
0
Code
Issues
Pull requests
Projects
Releases
Packages
Wiki
Activity
Actions
1
291e4f39e8
pandoc
/
test
/
lua
/
plain-to-para.lua
7 lines
87 B
Lua
Raw
Normal View
History
Unescape
Escape
Lua filters (#3514) * Add `--lua-filter` option. This works like `--filter` but takes pathnames of special lua filters and uses the lua interpreter baked into pandoc, so that no external interpreter is needed. Note that lua filters are all applied after regular filters, regardless of their position on the command line. * Add Text.Pandoc.Lua, exporting `runLuaFilter`. Add `pandoc.lua` to data files. * Add private module Text.Pandoc.Lua.PandocModule to supply the default lua module. * Add Tests.Lua to tests. * Add data/pandoc.lua, the lua module pandoc imports when processing its lua filters. * Document in MANUAL.txt.
2017-03-20 15:17:03 +01:00
return
{
Lua filter: use destructured functions for block filters Filtering functions take element components as arguments instead of the whole block elements. This resembles the way elements are handled in custom writers.
2017-04-14 11:21:58 +02:00
{
Plain
=
function
(
content
)
return
pandoc.Para
(
content
)
Lua filters (#3514) * Add `--lua-filter` option. This works like `--filter` but takes pathnames of special lua filters and uses the lua interpreter baked into pandoc, so that no external interpreter is needed. Note that lua filters are all applied after regular filters, regardless of their position on the command line. * Add Text.Pandoc.Lua, exporting `runLuaFilter`. Add `pandoc.lua` to data files. * Add private module Text.Pandoc.Lua.PandocModule to supply the default lua module. * Add Tests.Lua to tests. * Add data/pandoc.lua, the lua module pandoc imports when processing its lua filters. * Document in MANUAL.txt.
2017-03-20 15:17:03 +01:00
end
,
}
}
Reference in a new issue
Copy permalink