summaryrefslogtreecommitdiff
path: root/doc/lua-filters.md
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2022-06-06 18:25:09 +0200
committerGitHub <noreply@github.com>2022-06-06 09:25:09 -0700
commitb2b21bb4c54e5aae305a0166c044357023e38abd (patch)
tree34e08924a05a11d2a11fd34dcbebe43eec475157 /doc/lua-filters.md
parente5c41f11de39d71241bdaf4cc9cd6890846db742 (diff)
Lua: add function pandoc.mediabag.fill (#8104)
The function allows to fill the mediabag with all images in a given document. Images that cannot be fetched are replaced with a Span containing the image description.
Diffstat (limited to 'doc/lua-filters.md')
-rw-r--r--doc/lua-filters.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index 251b9fa85..ebba6a3b3 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -3791,6 +3791,26 @@ Parameters:
Clear-out the media bag, deleting all items.
+### fill {#pandoc.mediabag.fill}
+
+`fill (doc)`
+
+Fills the mediabag with the images in the given document. An
+image that cannot be retrieved will be replaced with a Span of
+class "image" that contains the image description.
+
+Images for which the mediabag already contains an item will
+not be processed again.
+
+Parameters:
+
+`doc`
+: document from which to fill the mediabag ([Pandoc](#type-pandoc))
+
+Returns:
+
+- modified document ([Pandoc](#type-pandoc))
+
### insert {#pandoc.mediabag.insert}
`insert (filepath, mime_type, contents)`