aboutsummaryrefslogtreecommitdiff
path: root/doc/lua-filters.md
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2019-02-09 09:52:51 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2019-02-09 20:12:33 +0100
commit9a9c138d9cc228537780f83d4de825b3adfe6aa5 (patch)
treedf1c0b8ce52c3d1597ba790fb30c16241cfba637 /doc/lua-filters.md
parent4543543063c210cc3a4215ea05635e5692619c79 (diff)
downloadpandoc-9a9c138d9cc228537780f83d4de825b3adfe6aa5.tar.gz
data/pandoc.lua: re-export all bundled modules
All Lua modules bundled with pandoc, i.e., `pandoc.List`, `pandoc.mediabag`, `pandoc.utils`, and `text` are re-exported from the `pandoc` module. They are assigned to the fields `List`, `mediabag`, `utils`, and `text`, respectively.
Diffstat (limited to 'doc/lua-filters.md')
-rw-r--r--doc/lua-filters.md11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index aab4a0b11..01d2b1a87 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -1360,8 +1360,8 @@ to a string via `tostring`.
# Module text
UTF-8 aware text manipulation functions, implemented in Haskell.
-These are available to any lua filter. However, the module must
-be explicitly loaded:
+The module is made available as part of the `pandoc` module via
+`pandoc.text`. The text module can also be loaded explicitly:
``` {.lua}
-- uppercase all regular text in a document:
@@ -2392,6 +2392,13 @@ The `pandoc.mediabag` module allows accessing pandoc's media
storage. The "media bag" is used when pandoc is called with the
`--extract-media` or `--standalone`/`-s` option.
+The module is loaded as part of module `pandoc` and can either be
+accessed via the `pandoc.mediabag` field, or explicitly required,
+e.g.:
+
+
+ local mb = require 'pandoc.mediabag'
+
### insert {#mediabag-insert}
`insert (filepath, mime_type, contents)`