From b9222e5cb1d8d1d3217f65c6a91886b897956dde Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sun, 28 Nov 2021 15:07:30 +0100 Subject: Lua: add constructors `pandoc.Blocks` and `pandoc.Inlines` The functions convert their argument into a list of Block and Inline values, respectively. --- doc/lua-filters.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'doc') 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} -- cgit v1.2.3