-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Haskell bindings to the discount Markdown library.
--   
--   Discount is a thin wrapper around the discount library
--   <a>http://www.pell.portland.or.us/~orc/Code/discount/</a> for parsing
--   Markdown. It supports both additional features such as definition
--   lists and tables, while also having a mode for pure Markdown.
@package discount
@version 0.1.1


-- | This module is a thin wrapper around the discount Markdown-processing
--   library, by David Parsons
--   <a>http://www.pell.portland.or.us/~orc/Code/discount/</a>. It exposes
--   options that can be passed to the parser, as well as <a>ByteString</a>
--   and <a>Text</a> interfaces to the parser itself.
module Text.Discount

-- | An option flag to be passed to the discount parser.
data DiscountOption

-- | Convert the ByteString String input into well-formed HTML output. Note
--   that an empty set of flags will not enable "strict" markdown behavior;
--   instead, use <a>compatOptions</a>, which will cause discount to pass
--   the markdown tests.
parseMarkdown :: [DiscountOption] -> ByteString -> ByteString

-- | As <a>parseMarkdown</a>, but taking <a>Text</a> values instead. Uses
--   UTF-8 internally.
parseMarkdownUtf8 :: [DiscountOption] -> Text -> Text

-- | Disables processing of links. Note that this will produce invalid HTML
--   due to a bug in discount!
noLinks :: DiscountOption

-- | Disables image processing. Note that this will produce invalid HTML
--   due to a bug in discount!
noImages :: DiscountOption

-- | Disables SmartyPants processing. SmartyPants replaces quotes with
--   curly quotes (except in code blocks), replaces <tt>(tm)</tt>,
--   <tt>(r)</tt>, and <tt>(c)</tt> with the relevant symbols, and replaces
--   ellipses and em/en-dashes with the appropriate symbols.
noSmartyPants :: DiscountOption

-- | Disables raw HTML. Note that this will produce invalid HTML due to a
--   bug in discount!
noHtml :: DiscountOption

-- | Disables both superscript and relaxed emphasis (see
--   <a>noRelaxedEmphasis</a>).
strict :: DiscountOption

-- | Disable pseudoprotocol wrapping. If this is not enabled, then links of
--   the form <tt><a>foo bar</a></tt> will be replaced by <tt>&lt;span
--   class="glarch"&gt;foo bar&lt;/span&gt;</tt>, and similarly for
--   <tt>abbr:desc</tt> (uses <tt>&lt;abbr title="desc"&gt;</tt>) and
--   <tt>id:name</tt> (uses <tt>&lt;a id="name"&gt;</tt>)
noPseudoProtocols :: DiscountOption

-- | Disables converstion of <tt>A^B</tt> into
--   <tt>A&lt;sup&gt;B&lt;/sup&gt;</tt>.
noSuperscripts :: DiscountOption

-- | Disables relaxed emphasis, allowing underscores to indicate emphasis
--   in the middle of a word. With relaxed emphasis on (i.e. without this
--   option) <tt>foo_bar_</tt> will parse as <tt>foo_bar_</tt>. With it
--   off, it parses as <tt>foo&lt;em&gt;bar&lt;/em&gt;</tt>.
noRelaxedEmphasis :: DiscountOption

-- | Disables PHP Markdown Extra-style tables. See the documentation on PHP
--   Markdown Extra at
--   <a>http://michelf.com/projects/php-markdown/extra/#table</a>.
noTables :: DiscountOption

-- | Disables <tt>~~strikethrough~~</tt>.
noStrikethrough :: DiscountOption

-- | Disables Pandoc-style header processing. This does not disable headers
--   like
--   
--   <pre>
--   This
--   ====
--   # or this
--   </pre>
noHeaders :: DiscountOption

-- | Disables div-style quotes. Div-style quotes translates
--   
--   <pre>
--   &gt; %class%
--   &gt; foo
--   </pre>
--   
--   as <tt>&lt;div class="class"&gt;foo&lt;/div&gt;</tt>.
noDivQuotes :: DiscountOption

-- | Disables alphanumeric-ordered lists.
noAlphaLists :: DiscountOption

-- | Disables definition lists.
noDefinitionLists :: DiscountOption

-- | Process Markdown even inside an HTML tag.
tagText :: DiscountOption

-- | Only allow links that are local or that point to <tt>http</tt>,
--   <tt>https</tt>, <tt>news</tt>, or <tt>ftp</tt> schemes.
safeLinks :: DiscountOption

-- | Expand tabs to 4 spaces.
tabStop :: DiscountOption

-- | Enable Markdown Extra style footnotes. See
--   <a>http://michelf.com/projects/php-markdown/extra/#footnotes</a>. For
--   example:
--   
--   <pre>
--   Here's some text with a footnote.[^1]
--   
--   [^1]: Here's a footnote with some text.
--   </pre>
--   
--   Footnotes have backlinks to their parent.
footnotes :: DiscountOption

-- | Disables all discount features not in the original Markdown spec:
--   SmartyPants, relaxed emphasis, pseudo-protocols, strikethrough,
--   headers, alphabetical lists, definition lists, superscripts, and
--   tables.
compatOptions :: [DiscountOption]
