From a088cbf5637596a461ba9f99b49210235d6c0a68 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Fri, 7 Oct 2022 21:37:57 +0200 Subject: Lua: support extensions in custom writers Custom writers can define the extensions that they support via the global `writer_extensions`. The variable's value must be a table with all supported extensions as keys, and their default status as values. E.g., the below specifies that the writer support the extensions `smart` and `sourcepos`, but only the `smart` extension is enabled by default: writer_extensions = { smart = true, sourcepos = false, } --- pandoc-lua-engine/pandoc-lua-engine.cabal | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pandoc-lua-engine/pandoc-lua-engine.cabal') diff --git a/pandoc-lua-engine/pandoc-lua-engine.cabal b/pandoc-lua-engine/pandoc-lua-engine.cabal index a122b935c..3c632026b 100644 --- a/pandoc-lua-engine/pandoc-lua-engine.cabal +++ b/pandoc-lua-engine/pandoc-lua-engine.cabal @@ -22,6 +22,7 @@ extra-source-files: README.md , test/bytestring.bin , test/bytestring.lua , test/bytestring-reader.lua + , test/extensions.lua , test/lua/*.lua , test/lua/module/*.lua , test/lua/module/partial.test @@ -66,7 +67,7 @@ library , Text.Pandoc.Lua.Init , Text.Pandoc.Lua.Marshal.CommonState , Text.Pandoc.Lua.Marshal.Context - , Text.Pandoc.Lua.Marshal.Extensions + , Text.Pandoc.Lua.Marshal.Format , Text.Pandoc.Lua.Marshal.PandocError , Text.Pandoc.Lua.Marshal.ReaderOptions , Text.Pandoc.Lua.Marshal.Reference -- cgit v1.2.3