HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulecommonmark-extensions-0.2.7.3Haskell2010

Commonmark.Extensions

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
  • 1 value