cheapskate-terminal-0.1.0.0: Initial project template from stack

Safe HaskellNone
LanguageHaskell2010

Cheapskate.Terminal

Contents

Synopsis

Rendering markdown to the terminal

prettyPrint :: Doc -> IO () Source

An alias for renderTerminal

renderTerminal :: Doc -> IO () Source

Prints a markdown document to the terminal

renderIO :: Doc -> IO Text Source

Renders a Doc doing IO reading options from the environment

Options

def :: Default a => a

The default value for this type.

renderIOWith :: PrettyPrintOptions -> Doc -> IO Text Source

Renders a Doc doing IO with some set of options

Pure rendering

renderPureWith :: PrettyPrintOptions -> Doc -> Text Source

Renders a Doc without doing IO

Internal functions and implementation comments

renderBlock :: PrettyPrintOptions -> Block -> IO Text Source

Renders a Block doing IO; this is necessary for pygments usage.

renderBlockPure :: PrettyPrintOptions -> Block -> Text Source

Renders a Block without doing IO. Uses a Text so wrapping is easier to implement. The absolute majority of the time is spent going from Text to Builder and back. If we strip out Builder we gain complexity like crazy. Suggestions welcome.

renderInline :: Inline -> Builder Source

Renders an inline to a Text Builder