pandoc-3.7.0.2: Conversion between markup formats

Copyright | © 2006-2024 John MacFarlane
License | GPL-2.0-or-later
Maintainer | John MacFarlane <jgm@berkeley@edu>
Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Transforms

Description

Transformation of a Pandoc document post-parsing

Synopsis

- type Transform = Pandoc -> Pandoc
- applyTransforms :: Monad m => [Transform] -> Pandoc -> m Pandoc
- adjustLinksAndIds :: Extensions -> Text -> [Text] -> Transform
- eastAsianLineBreakFilter :: Pandoc -> Pandoc
- filterIpynbOutput :: Maybe Format -> Pandoc -> Pandoc
- headerShift :: Int -> Pandoc -> Pandoc

# Documentation

type Transform = Pandoc -> Pandoc #

Transformation of a Pandoc document post-parsing

applyTransforms :: Monad m => [Transform] -> Pandoc -> m Pandoc #

Apply a list of transforms to a document, in order.

adjustLinksAndIds #

Arguments

:: Extensions | defines how IDs are generated
-> Text | thisfile
-> [Text] | allfiles
-> Transform |

Prefixes identifiers with a string derived from the filepath of `thisfile`; fixes links to targets in `allfiles` accordingly.

eastAsianLineBreakFilter :: Pandoc -> Pandoc #

Remove soft breaks between East Asian characters.

filterIpynbOutput :: Maybe Format -> Pandoc -> Pandoc #

Process ipynb output cells. If mode is Nothing, remove all output. If mode is Just format, select best output for the format. If format is not ipynb, strip out ANSI escape sequences from CodeBlocks (see #5633).

headerShift :: Int -> Pandoc -> Pandoc #

Shift header levels up or down.