aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc.hs35
1 files changed, 30 insertions, 5 deletions
diff --git a/src/Text/Pandoc.hs b/src/Text/Pandoc.hs
index a4738686b..2be7d9642 100644
--- a/src/Text/Pandoc.hs
+++ b/src/Text/Pandoc.hs
@@ -25,8 +25,25 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Stability : alpha
Portability : portable
-This helper module exports the basic writers, readers, and definitions
-from the Pandoc libraries.
+This helper module exports the main writers, readers, and data
+structure definitions from the Pandoc libraries.
+
+A typical application will chain together a reader and a writer
+to convert strings from one format to another. For example, the
+following simple program will act as a filter converting markdown
+fragments to reStructuredText, using reference-style links instead of
+inline links:
+
+> module Main where
+> import Text.Pandoc
+>
+> markdownToRST :: String -> String
+> markdownToRST = encodeUTF8 .
+> (writeRST defaultWriterOptions {writerReferenceLinks = True}) .
+> (readMarkdown defaultParserState) . decodeUTF8
+>
+> main = interact markdownToRST
+
-}
module Text.Pandoc
@@ -41,6 +58,11 @@ module Text.Pandoc
-- * Parser state used in readers
, ParserState (..)
, defaultParserState
+ , ParserContext (..)
+ , QuoteContext (..)
+ , KeyTable
+ , NoteTable
+ , HeaderType (..)
-- * Writers: converting /from/ Pandoc format
, writeMarkdown
, writeRST
@@ -48,6 +70,7 @@ module Text.Pandoc
, writeHtml
, writeHtmlString
, writeS5
+ , writeS5String
, writeDocbook
, writeMan
, writeRTF
@@ -55,9 +78,10 @@ module Text.Pandoc
-- * Writer options used in writers
, WriterOptions (..)
, defaultWriterOptions
- -- * UTF-8 encoding and decoding
- , encodeUTF8
- , decodeUTF8
+ -- * Default headers for various output formats
+ , module Text.Pandoc.Writers.DefaultHeaders
+ -- * Functions for converting to and from UTF-8
+ , module Text.Pandoc.UTF8
) where
import Text.Pandoc.Definition
@@ -73,6 +97,7 @@ import Text.Pandoc.Writers.S5
import Text.Pandoc.Writers.Docbook
import Text.Pandoc.Writers.Man
import Text.Pandoc.Writers.RTF
+import Text.Pandoc.Writers.DefaultHeaders
import Text.Pandoc.UTF8
import Text.Pandoc.Shared