pandoc-builder-monadic-1.1.1: A monadic DSL for building pandoc documents
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Pandoc.Builder.Monadic.Utils

Description

Utility functions for working with builders, and constructed pandoc ASTs

Synopsis

Documentation

mapBuilder :: (a -> b) -> Builder a -> Builder b Source #

Map every element written in a Builder. This is useful if you have laid out bespoke elements, such as

mapBuilder boldStrings $ do
  div "lorem ipsum "
  str "dolor sit amet"

boldStrings s@(Str _) = Strong s
boldStrings a = a

It's also useful for creating custom pandoc builders. See tableWithColspec.

intersperseTablesWithBlankRows :: Builder Block -> Builder Block Source #

Intersperse table with blank rows, this is useful for clarity (with some backends) when using multiline cells. This is exposed as a modifier, because there are already too many ways to construct a table.

vspace :: Builder Block Source #

Vertical space - a paragraph containing a non-breaking space