aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2025-05-14 09:26:04 +0200
committerJohn MacFarlane <[email protected]>2025-05-14 09:17:24 -0700
commit5b896bc1a962568bddbd62b760ef41d0574af248 (patch)
tree05c129cdc4ff8e315a4f7ab8cf9553c89b03f317 /doc
parentbe9fbb3f6731dc6223816677aab6c64243511c8f (diff)
Lua: allow to pass files to the `pandoc.read` sandbox
The sandbox is now enabled if the fourth parameter is a list of files. The files are read and then made available in the sandbox via a mock file system.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua-filters.md16
1 files changed, 5 insertions, 11 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index 6a6460431..6e3aca090 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -3772,17 +3772,11 @@ Parameters:
documented in the manual. ([ReaderOptions]|table)
`read_env`
-: which environment the reader operates in: Possible values
- are:
-
- - 'io' is the default and gives the behavior described above.
- - 'global' uses the same environment that was used to read
- the input files; the parser has full access to the
- file-system and the mediabag.
- - 'sandbox' works like 'global' and give the parser access to
- the mediabag, but prohibits file-system access.
-
- Defaults to `'io'`. (string)
+: If the value is not given or `nil`, then the global
+ environment is used. Passing a list of filenames causes the
+ reader to be run in a sandbox. The given files are read from
+ the file system and provided to the sandbox in a ersatz file
+ system.
Returns: pandoc document ([Pandoc](#type-pandoc))