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.Content

Description

Defines a helper type that can handle different types of Block and Inline element contents.

Synopsis

Documentation

data Content Source #

Helper type to represent all the different types a content attribute can have.

contentTypeDescription :: Content -> String Source #

Gets the text property of an Inline, if present.

peekContent :: LuaError e => Peeker e Content Source #

Gets a Content element from the stack.

pushContent :: LuaError e => Pusher e Content Source #

Pushes the Content to the stack.

peekDefinitionItem :: LuaError e => Peeker e ([Inline], [[Block]]) Source #

Retrieves a single definition item from the stack; it is expected to be a pair of a list of inlines and a list of list of blocks. Uses fuzzy parsing, i.e., tries hard to convert mismatching types into the expected result.