jira-wiki-markup-1.4.0: Handle Jira wiki markup

Copyright | © 2019–2021 Albert Krewinkel
License | MIT
Maintainer | Albert Krewinkel <tarleb@zeitkraut.de>
Stability | alpha
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Text.Jira.Printer

Description

Generate Jira wiki markup text from an abstract syntax tree.

Synopsis

- pretty :: Doc -> Text
- renderBlock :: Block -> JiraPrinter Text
- renderInline :: Inline -> Text
- prettyBlocks :: [Block] -> Text
- prettyInlines :: [Inline] -> Text
- type JiraPrinter a = Reader PrinterState a
- data PrinterState = PrinterState {
  - stateInTable :: Bool
  - stateListLevel :: Text
  }
- startState :: PrinterState
- withDefault :: JiraPrinter a -> a

# Documentation

pretty :: Doc -> Text #

Render Jira document as Jira wiki formatted text.

renderBlock :: Block -> JiraPrinter Text #

Render a block as Jira wiki format.

renderInline :: Inline -> Text #

Renders a single inline item as Jira markup.

prettyBlocks :: [Block] -> Text #

Render a list of Jira blocks as Jira wiki formatted text.

prettyInlines :: [Inline] -> Text #

Renders a list of Jira inline markup elements.

type JiraPrinter a = Reader PrinterState a #

data PrinterState #

Internal state used by the printer.

Constructors

PrinterState |
Fields stateInTable :: Bool stateListLevel :: Text

startState :: PrinterState #

Default start state of the printer.

withDefault :: JiraPrinter a -> a #

Run with default state.