aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2023-01-18 12:19:49 +0100
committerJohn MacFarlane <[email protected]>2023-01-18 08:59:53 -0800
commit3a0fc17880b286d5116e335ade986de91089b3da (patch)
tree5f65bff411fb55e17119c50d0911d6d454d8d0a1 /doc
parent671cfcd86916518ead37c868c039638e53c1239a (diff)
Lua: add function pandoc.format.extensions.
This simplifies the creation of custom readers and writers that are based on built-in formats.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua-filters.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index 22a3a9bbb..cb17ad851 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -4441,6 +4441,27 @@ Returns:
- default extensions enabled for `format` (FormatExtensions)
+### extensions {#pandoc.format.extensions}
+
+Returns the extension configuration for the given format.
+The configuration is represented as a table with all supported
+extensions as keys and their default status as value, with
+`true` indicating that the extension is enabled by default,
+while `false` marks a supported extension that's disabled.
+
+This function can be used to assign a value to the `Extensions`
+global in custom readers and writers.
+
+Parameters:
+
+`format`
+: format identifier (string)
+
+Returns:
+
+- extensions config
+
+
# Module pandoc.path
Module for file path manipulations.