pandoc-lua-marshal-0.2.0: Use pandoc types in Lua
Copyright© 2021-2023 Albert Krewinkel
LicenseMIT
MaintainerAlbert Krewinkel <tarleb+pandoc@moltkeplatz.de>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Pandoc.Lua.Marshal.Pandoc

Description

Marshaling/unmarshaling functions of Pandoc values.

Synopsis

Pandoc

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.