Copyright | Copyright (C) 2006-2024 John MacFarlane |
---|---|
License | GNU GPL, version 2 or above |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Stability | alpha |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Text.Pandoc
Description
This helper module exports the main writers, readers, and datastructure definitions from the Pandoc libraries.
A typical application will chain together a reader and a writerto convert strings from one format to another. For example, thefollowing simple program will act as a filter converting markdownfragments to reStructuredText, using reference-style links instead ofinline links:
module Main whereimport Text.Pandocimport Data.Text (Text)import qualified Data.Text.IO as TmdToRST :: Text -> IO TextmdToRST txt = runIOorExplode $ readMarkdown def txt >>= writeRST def{ writerReferenceLinks = True }main :: IO ()main = do T.getContents >>= mdToRST >>= T.putStrLn
moduleText.Pandoc.Definition
moduleText.Pandoc.Generic
moduleText.Pandoc.Options
moduleText.Pandoc.Logging
moduleText.Pandoc.Class
moduleText.Pandoc.Data
moduleText.Pandoc.Error
moduleText.Pandoc.Readers
moduleText.Pandoc.Writers
moduleText.Pandoc.Templates
setTranslations ::PandocMonad m =>Lang -> m ()Source#
Select the language to use withtranslateTerm
. Note that this does not read a translation file; that is only done the first timetranslateTerm
is used.
translateTerm ::PandocMonad m =>Term -> mTextSource#
Get a translation from the current term map. Issue a warning if the term is not defined.
pandocVersion ::VersionSource#
Version number of pandoc library.
pandocVersionText ::TextSource#
Text representation of the library's version number.
Produced byHaddock version 2.29.1