diff options
| author | Albert Krewinkel <albert@zeitkraut.de> | 2022-01-02 13:53:39 +0100 |
|---|---|---|
| committer | Albert Krewinkel <albert@zeitkraut.de> | 2022-01-02 13:57:01 +0100 |
| commit | 85334eb6c462432ec4ccbc7ef360a7e472deb3c7 (patch) | |
| tree | d2c1484fb8207438371736276e457cc3f1f9b0a7 | |
| parent | 6121de369ce5a3500643b85a2b436648723a6a89 (diff) | |
Lua writer: provide global `PANDOC_WRITER_OPTIONS`
Closes: #6731
| -rw-r--r-- | doc/lua-filters.md | 4 | ||||
| -rw-r--r-- | src/Text/Pandoc/Writers/Custom.hs | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md index ac04316e2..d46ed001d 100644 --- a/doc/lua-filters.md +++ b/doc/lua-filters.md @@ -267,6 +267,10 @@ variables. While the object can be modified, the changes will **not** be picked up by pandoc. + This variable is also set in custom writers. + + *Since: pandoc 2.17* + `PANDOC_VERSION` : Contains the pandoc version as a [Version] object which behaves like a numerically indexed table, most significant diff --git a/src/Text/Pandoc/Writers/Custom.hs b/src/Text/Pandoc/Writers/Custom.hs index da212ab4e..d13fbfb24 100644 --- a/src/Text/Pandoc/Writers/Custom.hs +++ b/src/Text/Pandoc/Writers/Custom.hs @@ -89,6 +89,7 @@ writeCustom :: (PandocMonad m, MonadIO m) writeCustom luaFile opts doc@(Pandoc meta _) = do let globals = [ PANDOC_DOCUMENT doc , PANDOC_SCRIPT_FILE luaFile + , PANDOC_WRITER_OPTIONS opts ] res <- runLua $ do setGlobals globals |
