commonmark-extensions-0.2.5.4: Pure Haskell commonmark parser.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Commonmark.Extensions

Description

Syntax extensions for the commonmark library. Usage example:

{-# LANGUAGE ScopedTypeVariables #-}
import Commonmark
import Commonmark.Extensions
import Data.Text.IO as TIO
import Data.Text.Lazy.IO as TLIO

main :: IO ()
main = do
  let customSyntax =
         (mathSpec <> smartPunctuationSpec <> defaultSyntaxSpec)
  inp <- TIO.getContents
  res <- commonmarkWith customSyntax "stdin" inp
  case res of
    Left e                  -> error (show e)
    Right (html :: Html ()) -> TLIO.putStr $ renderHtml html
Synopsis

Documentation

gfmExtensions :: (Monad m, Typeable m, Typeable il, Typeable bl, IsBlock il bl, IsInline il, HasFootnote il bl, HasEmoji il, HasStrikethrough il, HasPipeTable il bl, HasTaskList il bl, ToPlainText il, HasAlerts il bl) => SyntaxSpec m il bl Source #

Standard extensions for GitHub-flavored Markdown.