pandoc-2.17.1.1: Conversion between markup formats

Copyright | Copyright © 2017-2022 Albert Krewinkel
License | GNU GPL, version 2 or above
Maintainer | Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
Stability | alpha
Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Lua

Contents

- Lua globals
- Filters

Description

Running pandoc Lua filters.

Synopsis

- runLua :: (PandocMonad m, MonadIO m) => LuaE PandocError a -> m (Either PandocError a)
- data Global
  - = FORMAT Text
  - | PANDOC_API_VERSION
  - | PANDOC_DOCUMENT Pandoc
  - | PANDOC_READER_OPTIONS ReaderOptions
  - | PANDOC_WRITER_OPTIONS WriterOptions
  - | PANDOC_SCRIPT_FILE FilePath
  - | PANDOC_STATE CommonState
  - | PANDOC_VERSION
- setGlobals :: [Global] -> LuaE PandocError ()
- runFilterFile :: FilePath -> Pandoc -> LuaE PandocError Pandoc

# Documentation

runLua :: (PandocMonad m, MonadIO m) => LuaE PandocError a -> m (Either PandocError a) #

Run the lua interpreter, using pandoc's default way of environment initialization.

# Lua globals

data Global #

Permissible global Lua variables.

Constructors

FORMAT Text |
PANDOC_API_VERSION |
PANDOC_DOCUMENT Pandoc |
PANDOC_READER_OPTIONS ReaderOptions |
PANDOC_WRITER_OPTIONS WriterOptions |
PANDOC_SCRIPT_FILE FilePath |
PANDOC_STATE CommonState |
PANDOC_VERSION |

setGlobals :: [Global] -> LuaE PandocError () #

Set all given globals.

# Filters

runFilterFile :: FilePath -> Pandoc -> LuaE PandocError Pandoc #

Transform document using the filter defined in the given file.