cmark-0.5.6.3: 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 Source #

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

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 Source #

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

toConstr :: Node -> Constr Source #

dataTypeOf :: Node -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Ord Node Source # 
Instance details

Defined in CMark

Read Node Source # 
Instance details

Defined in CMark

Show Node Source # 
Instance details

Defined in CMark

Generic Node Source # 
Instance details

Defined in CMark

Associated Types

type Rep Node :: Type -> Type Source #

Methods

from :: Node -> Rep Node x Source #

to :: Rep Node x -> Node Source #

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 Source #

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

toConstr :: NodeType -> Constr Source #

dataTypeOf :: NodeType -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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 Source #

type Rep NodeType Source # 
Instance details

Defined in CMark

data PosInfo Source #

Constructors

PosInfo 
Instances
Eq PosInfo Source # 
Instance details

Defined in CMark

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 Source #

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

toConstr :: PosInfo -> Constr Source #

dataTypeOf :: PosInfo -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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 Source #

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 Source #

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

toConstr :: DelimType -> Constr Source #

dataTypeOf :: DelimType -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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 Source #

type Rep DelimType Source # 
Instance details

Defined in CMark

type Rep DelimType = D1 (MetaData "DelimType" "CMark" "cmark-0.5.6.3-BxFe0cY7DpD5Yq1pVcjiKr" 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 Source #

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

toConstr :: ListType -> Constr Source #

dataTypeOf :: ListType -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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 Source #

type Rep ListType Source # 
Instance details

Defined in CMark

type Rep ListType = D1 (MetaData "ListType" "CMark" "cmark-0.5.6.3-BxFe0cY7DpD5Yq1pVcjiKr" 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 Source #

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

toConstr :: ListAttributes -> Constr Source #

dataTypeOf :: ListAttributes -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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 Source #

type Rep ListAttributes Source # 
Instance details

Defined in CMark

type Url = Text Source #

type Level = Int Source #

type Info = Text Source #