cmark-0.5.6.1: Fast, accurate CommonMark (Markdown) parser and renderer

Safe HaskellNone
LanguageHaskell2010

CMark

Synopsis

Documentation

commonmarkToHtml :: [CMarkOption] -> Text -> Text Source #

Convert CommonMark formatted text to Html, using cmark's built-in renderer.

commonmarkToXml :: [CMarkOption] -> Text -> Text Source #

Convert CommonMark formatted text to CommonMark XML, using cmark's built-in renderer.

commonmarkToMan :: [CMarkOption] -> Maybe Int -> Text -> Text Source #

Convert CommonMark formatted text to groff man, using cmark's built-in renderer.

commonmarkToLaTeX :: [CMarkOption] -> Maybe Int -> Text -> Text Source #

Convert CommonMark formatted text to latex, using cmark's built-in renderer.

commonmarkToNode :: [CMarkOption] -> Text -> Node Source #

Convert CommonMark formatted text to a structured Node tree, which can be transformed or rendered using Haskell code.

optSourcePos :: CMarkOption Source #

Include a data-sourcepos attribute on block elements.

optNormalize :: CMarkOption Source #

Normalize the document by consolidating adjacent text nodes.

optHardBreaks :: CMarkOption Source #

Render softbreak elements as hard line breaks.

optSmart :: CMarkOption Source #

Convert straight quotes to curly, --- to em-dash, -- to en-dash.

optSafe :: CMarkOption Source #

Suppress rendering of raw HTML and potentially dangerous URLs in links and images.

data Node Source #

Constructors

Node (Maybe PosInfo) NodeType [Node] 
Instances
Eq Node Source # 
Instance details

Defined in CMark

Methods

(==) :: Node -> Node -> Bool #

(/=) :: Node -> Node -> Bool #

Data Node Source # 
Instance details

Defined in CMark

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Node -> c Node #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Node #

toConstr :: Node -> Constr #

dataTypeOf :: Node -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Node) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Node) #

gmapT :: (forall b. Data b => b -> b) -> Node -> Node #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Node -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Node -> r #

gmapQ :: (forall d. Data d => d -> u) -> Node -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Node -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Node -> m Node #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Node -> m Node #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Node -> m Node #

Ord Node Source # 
Instance details

Defined in CMark

Methods

compare :: Node -> Node -> Ordering #

(<) :: Node -> Node -> Bool #

(<=) :: Node -> Node -> Bool #

(>) :: Node -> Node -> Bool #

(>=) :: Node -> Node -> Bool #

max :: Node -> Node -> Node #

min :: Node -> Node -> Node #

Read Node Source # 
Instance details

Defined in CMark

Show Node Source # 
Instance details

Defined in CMark

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

Generic Node Source # 
Instance details

Defined in CMark

Associated Types

type Rep Node :: Type -> Type #

Methods

from :: Node -> Rep Node x #

to :: Rep Node x -> Node #

type Rep Node Source # 
Instance details

Defined in CMark

data NodeType Source #

Instances
Eq NodeType Source # 
Instance details

Defined in CMark

Data NodeType Source # 
Instance details

Defined in CMark

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NodeType -> c NodeType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NodeType #

toConstr :: NodeType -> Constr #

dataTypeOf :: NodeType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NodeType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NodeType) #

gmapT :: (forall b. Data b => b -> b) -> NodeType -> NodeType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NodeType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NodeType -> r #

gmapQ :: (forall d. Data d => d -> u) -> NodeType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NodeType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NodeType -> m NodeType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NodeType -> m NodeType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NodeType -> m NodeType #

Ord NodeType Source # 
Instance details

Defined in CMark

Read NodeType Source # 
Instance details

Defined in CMark

Show NodeType Source # 
Instance details

Defined in CMark

Generic NodeType Source # 
Instance details

Defined in CMark

Associated Types

type Rep NodeType :: Type -> Type #

Methods

from :: NodeType -> Rep NodeType x #

to :: Rep NodeType x -> NodeType #

type Rep NodeType Source # 
Instance details

Defined in CMark

data PosInfo Source #

Constructors

PosInfo 
Instances
Eq PosInfo Source # 
Instance details

Defined in CMark

Methods

(==) :: PosInfo -> PosInfo -> Bool #

(/=) :: PosInfo -> PosInfo -> Bool #

Data PosInfo Source # 
Instance details

Defined in CMark

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PosInfo -> c PosInfo #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PosInfo #

toConstr :: PosInfo -> Constr #

dataTypeOf :: PosInfo -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PosInfo) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PosInfo) #

gmapT :: (forall b. Data b => b -> b) -> PosInfo -> PosInfo #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PosInfo -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PosInfo -> r #

gmapQ :: (forall d. Data d => d -> u) -> PosInfo -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PosInfo -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PosInfo -> m PosInfo #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PosInfo -> m PosInfo #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PosInfo -> m PosInfo #

Ord PosInfo Source # 
Instance details

Defined in CMark

Read PosInfo Source # 
Instance details

Defined in CMark

Show PosInfo Source # 
Instance details

Defined in CMark

Generic PosInfo Source # 
Instance details

Defined in CMark

Associated Types

type Rep PosInfo :: Type -> Type #

Methods

from :: PosInfo -> Rep PosInfo x #

to :: Rep PosInfo x -> PosInfo #

type Rep PosInfo Source # 
Instance details

Defined in CMark

data DelimType Source #

Constructors

PERIOD_DELIM 
PAREN_DELIM 
Instances
Eq DelimType Source # 
Instance details

Defined in CMark

Data DelimType Source # 
Instance details

Defined in CMark

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DelimType -> c DelimType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DelimType #

toConstr :: DelimType -> Constr #

dataTypeOf :: DelimType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DelimType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DelimType) #

gmapT :: (forall b. Data b => b -> b) -> DelimType -> DelimType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DelimType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DelimType -> r #

gmapQ :: (forall d. Data d => d -> u) -> DelimType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DelimType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DelimType -> m DelimType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DelimType -> m DelimType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DelimType -> m DelimType #

Ord DelimType Source # 
Instance details

Defined in CMark

Read DelimType Source # 
Instance details

Defined in CMark

Show DelimType Source # 
Instance details

Defined in CMark

Generic DelimType Source # 
Instance details

Defined in CMark

Associated Types

type Rep DelimType :: Type -> Type #

type Rep DelimType Source # 
Instance details

Defined in CMark

type Rep DelimType = D1 (MetaData "DelimType" "CMark" "cmark-0.5.6.1-5ult8fGi3G6IcAXDdKUQ8X" False) (C1 (MetaCons "PERIOD_DELIM" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "PAREN_DELIM" PrefixI False) (U1 :: Type -> Type))

data ListType Source #

Constructors

BULLET_LIST 
ORDERED_LIST 
Instances
Eq ListType Source # 
Instance details

Defined in CMark

Data ListType Source # 
Instance details

Defined in CMark

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ListType -> c ListType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ListType #

toConstr :: ListType -> Constr #

dataTypeOf :: ListType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ListType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ListType) #

gmapT :: (forall b. Data b => b -> b) -> ListType -> ListType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ListType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ListType -> r #

gmapQ :: (forall d. Data d => d -> u) -> ListType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ListType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ListType -> m ListType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ListType -> m ListType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ListType -> m ListType #

Ord ListType Source # 
Instance details

Defined in CMark

Read ListType Source # 
Instance details

Defined in CMark

Show ListType Source # 
Instance details

Defined in CMark

Generic ListType Source # 
Instance details

Defined in CMark

Associated Types

type Rep ListType :: Type -> Type #

Methods

from :: ListType -> Rep ListType x #

to :: Rep ListType x -> ListType #

type Rep ListType Source # 
Instance details

Defined in CMark

type Rep ListType = D1 (MetaData "ListType" "CMark" "cmark-0.5.6.1-5ult8fGi3G6IcAXDdKUQ8X" False) (C1 (MetaCons "BULLET_LIST" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ORDERED_LIST" PrefixI False) (U1 :: Type -> Type))

data ListAttributes Source #

Instances
Eq ListAttributes Source # 
Instance details

Defined in CMark

Data ListAttributes Source # 
Instance details

Defined in CMark

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ListAttributes -> c ListAttributes #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ListAttributes #

toConstr :: ListAttributes -> Constr #

dataTypeOf :: ListAttributes -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ListAttributes) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ListAttributes) #

gmapT :: (forall b. Data b => b -> b) -> ListAttributes -> ListAttributes #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ListAttributes -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ListAttributes -> r #

gmapQ :: (forall d. Data d => d -> u) -> ListAttributes -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ListAttributes -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ListAttributes -> m ListAttributes #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ListAttributes -> m ListAttributes #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ListAttributes -> m ListAttributes #

Ord ListAttributes Source # 
Instance details

Defined in CMark

Read ListAttributes Source # 
Instance details

Defined in CMark

Show ListAttributes Source # 
Instance details

Defined in CMark

Generic ListAttributes Source # 
Instance details

Defined in CMark

Associated Types

type Rep ListAttributes :: Type -> Type #

type Rep ListAttributes Source # 
Instance details

Defined in CMark

type Url = Text Source #

type Level = Int Source #

type Info = Text Source #