aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-11-28 15:07:30 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2021-11-28 16:02:42 +0100
commitb9222e5cb1d8d1d3217f65c6a91886b897956dde (patch)
treeb08aa67eab72a6c2858a2c3a243680f25e2d7017 /doc
parent4874f2dbd24ef8dbc078a1b81184c91524c93efb (diff)
downloadpandoc-b9222e5cb1d8d1d3217f65c6a91886b897956dde.tar.gz
Lua: add constructors `pandoc.Blocks` and `pandoc.Inlines`
The functions convert their argument into a list of Block and Inline values, respectively.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua-filters.md37
1 files changed, 36 insertions, 1 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index db5d1ccac..f24a66579 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -2074,7 +2074,7 @@ format, and functions to filter and modify a subtree.
Returns: [MetaBool] object
-## Blocks
+## Block
[`BlockQuote (content)`]{#pandoc.blockquote}
@@ -2254,6 +2254,20 @@ format, and functions to filter and modify a subtree.
Returns: [Table](#type-table) object
+## Blocks
+
+[`Blocks (block_like_elements)`]{#pandoc.blocks}
+
+: Creates a [Blocks](#type-blocks) list.
+
+ Parameters:
+
+ `block_like_elements`:
+ : List where each element can be treated as a [Block]
+ value, or a single such value.
+
+ Returns: [Blocks] list
+
## Inline
[`Cite (content, citations)`]{#pandoc.cite}
@@ -2543,6 +2557,27 @@ format, and functions to filter and modify a subtree.
Returns: [Underline](#type-underline) object
+## Inlines
+
+[`Inlines (inline_like_elements)`]{#pandoc.inlines}
+
+: Converts its argument into an [Inlines](#type-inlines) list:
+
+ - copies a list of [Inline] elements into a fresh list; any
+ string `s` within the list is treated as `pandoc.Str(s)`;
+ - turns a single [Inline] into a singleton list;
+ - splits a string into `Str`-wrapped words, treating
+ interword spaces as `Space`s or `SoftBreak`s.
+
+ Parameters:
+
+ `inline_like_elements`:
+ : List where each element can be treated as an [Inline]
+ values, or just a single such value.
+
+ Returns: [Inlines] list
+
+
## Element components
[`Attr ([identifier[, classes[, attributes]]])`]{#pandoc.attr}