pandoc-lua-marshal-0.3.1: Use pandoc types in Lua

Copyright | © 2021-2025 Albert Krewinkel
License | MIT
Maintainer | Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Lua.Marshal.Pandoc

Contents

- Pandoc
- Meta
- Filtering

Description

Marshaling/unmarshaling functions of `Pandoc` values.

Synopsis

- typePandoc :: LuaError e => DocumentedType e Pandoc
- peekPandoc :: LuaError e => Peeker e Pandoc
- pushPandoc :: LuaError e => Pusher e Pandoc
- mkPandoc :: LuaError e => DocumentedFunction e
- peekMeta :: LuaError e => Peeker e Meta
- pushMeta :: LuaError e => Pusher e Meta
- mkMeta :: LuaError e => DocumentedFunction e
- applyFully :: LuaError e => Filter -> Pandoc -> LuaE e Pandoc

# Pandoc

typePandoc :: LuaError e => DocumentedType e Pandoc Source #

Pandoc object type.

peekPandoc :: LuaError e => Peeker e Pandoc Source #

Retrieves a `Pandoc` document from a userdata value.

pushPandoc :: LuaError e => Pusher e Pandoc Source #

Pushes a `Pandoc` value as userdata.

mkPandoc :: LuaError e => DocumentedFunction e Source #

Constructor function for `Pandoc` values.

# Meta

peekMeta :: LuaError e => Peeker e Meta Source #

Retrieves a `Meta` value from a string-indexed table.

pushMeta :: LuaError e => Pusher e Meta Source #

Pushes a `Meta` value as a string-indexed table.

mkMeta :: LuaError e => DocumentedFunction e Source #

Constructor for `Meta` values.

# Filtering

applyFully :: LuaError e => Filter -> Pandoc -> LuaE e Pandoc Source #

Apply all components of a Lua filter.

These operations are run in order:

- Inline filter functions are applied to Inline elements, splicing the result back into the list of Inline elements
- The `Inlines` function is applied to all lists of Inlines.
- Block filter functions are applied to Block elements, splicing the result back into the list of Block elements
- The `Blocks` function is applied to all lists of Blocks.
- The `Meta` function is applied to the `Meta` part.
- The `Pandoc` function is applied to the full `Pandoc` element.