Safe Haskell | None |
---|---|
Language | Haskell2010 |
CMarkGFM
Synopsis
- commonmarkToHtml :: [CMarkOption] -> [CMarkExtension] -> Text -> Text
- commonmarkToXml :: [CMarkOption] -> [CMarkExtension] -> Text -> Text
- commonmarkToMan :: [CMarkOption] -> [CMarkExtension] -> Maybe Int -> Text -> Text
- commonmarkToLaTeX :: [CMarkOption] -> [CMarkExtension] -> Maybe Int -> Text -> Text
- commonmarkToNode :: [CMarkOption] -> [CMarkExtension] -> Text -> Node
- nodeToHtml :: [CMarkOption] -> [CMarkExtension] -> Node -> Text
- nodeToXml :: [CMarkOption] -> Node -> Text
- nodeToMan :: [CMarkOption] -> Maybe Int -> Node -> Text
- nodeToLaTeX :: [CMarkOption] -> Maybe Int -> Node -> Text
- nodeToCommonmark :: [CMarkOption] -> Maybe Int -> Node -> Text
- optSourcePos :: CMarkOption
- optHardBreaks :: CMarkOption
- optSmart :: CMarkOption
- optSafe :: CMarkOption
- optUnsafe :: CMarkOption
- extStrikethrough :: CMarkExtension
- extTable :: CMarkExtension
- extAutolink :: CMarkExtension
- extTagfilter :: CMarkExtension
- extTaskList :: CMarkExtension
- data Node = Node (Maybe PosInfo) NodeType [Node]
- data NodeType
- = DOCUMENT
- | THEMATIC_BREAK
- | PARAGRAPH
- | BLOCK_QUOTE
- | HTML_BLOCK Text
- | CUSTOM_BLOCK OnEnter OnExit
- | CODE_BLOCK Info Text
- | HEADING Level
- | LIST ListAttributes
- | ITEM
- | TEXT Text
- | SOFTBREAK
- | LINEBREAK
- | HTML_INLINE Text
- | CUSTOM_INLINE OnEnter OnExit
- | CODE Text
- | EMPH
- | STRONG
- | LINK Url Title
- | IMAGE Url Title
- | STRIKETHROUGH
- | TABLE [TableCellAlignment]
- | TABLE_ROW
- | TABLE_CELL
- data PosInfo = PosInfo {
- startLine :: Int
- startColumn :: Int
- endLine :: Int
- endColumn :: Int
- data DelimType
- data ListType
- data ListAttributes = ListAttributes {}
- type Url = Text
- type Title = Text
- type Level = Int
- type Info = Text
- data TableCellAlignment
- data CMarkOption
- data CMarkExtension
Documentation
commonmarkToHtml :: [CMarkOption] -> [CMarkExtension] -> Text -> Text #
Convert CommonMark formatted text to Html, using cmark's built-in renderer.
commonmarkToXml :: [CMarkOption] -> [CMarkExtension] -> Text -> Text #
Convert CommonMark formatted text to CommonMark XML, using cmark's built-in renderer.
commonmarkToMan :: [CMarkOption] -> [CMarkExtension] -> Maybe Int -> Text -> Text #
Convert CommonMark formatted text to groff man, using cmark's built-in renderer.
commonmarkToLaTeX :: [CMarkOption] -> [CMarkExtension] -> Maybe Int -> Text -> Text #
Convert CommonMark formatted text to latex, using cmark's built-in renderer.
commonmarkToNode :: [CMarkOption] -> [CMarkExtension] -> Text -> Node #
Convert CommonMark formatted text to a structured Node
tree,
which can be transformed or rendered using Haskell code.
nodeToHtml :: [CMarkOption] -> [CMarkExtension] -> Node -> Text #
nodeToXml :: [CMarkOption] -> Node -> Text #
nodeToMan :: [CMarkOption] -> Maybe Int -> Node -> Text #
nodeToLaTeX :: [CMarkOption] -> Maybe Int -> Node -> Text #
nodeToCommonmark :: [CMarkOption] -> Maybe Int -> Node -> Text #
Include a data-sourcepos
attribute on block elements.
optHardBreaks :: CMarkOption #
Render softbreak
elements as hard line breaks.
optSmart :: CMarkOption #
Convert straight quotes to curly, ---
to em-dash, --
to en-dash.
optSafe :: CMarkOption #
optSafe is defined here for API compatibility, but it no longer has any effect. Safe mode is now the default: set optUnsafe to disable it.
Allow rendering of raw HTML and potentially dangerous URLs in links and images.
Instances
Eq Node # | |
Data Node # | |
Defined in CMarkGFM 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 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 :: forall r r'. (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 # | |
Read Node # | |
Show Node # | |
Generic Node # | |
type Rep Node # | |
Defined in CMarkGFM type Rep Node = D1 ('MetaData "Node" "CMarkGFM" "cmark-gfm-0.2.1-Lma5Mgws1kz7kaez4QT2yx" 'False) (C1 ('MetaCons "Node" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe PosInfo)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NodeType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Node])))) |
Constructors
DOCUMENT | |
THEMATIC_BREAK | |
PARAGRAPH | |
BLOCK_QUOTE | |
HTML_BLOCK Text | |
CUSTOM_BLOCK OnEnter OnExit | |
CODE_BLOCK Info Text | |
HEADING Level | |
LIST ListAttributes | |
ITEM | |
TEXT Text | |
SOFTBREAK | |
LINEBREAK | |
HTML_INLINE Text | |
CUSTOM_INLINE OnEnter OnExit | |
CODE Text | |
EMPH | |
STRONG | |
LINK Url Title | |
IMAGE Url Title | |
STRIKETHROUGH | |
TABLE [TableCellAlignment] | |
TABLE_ROW | |
TABLE_CELL |
Instances
Eq NodeType # | |
Data NodeType # | |
Defined in CMarkGFM 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 :: forall r r'. (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 # | |
Read NodeType # | |
Show NodeType # | |
Generic NodeType # | |
type Rep NodeType # | |
Constructors
PosInfo | |
Fields
|
Instances
Eq PosInfo # | |
Data PosInfo # | |
Defined in CMarkGFM 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 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 :: forall r r'. (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 # | |
Read PosInfo # | |
Show PosInfo # | |
Generic PosInfo # | |
type Rep PosInfo # | |
Defined in CMarkGFM type Rep PosInfo = D1 ('MetaData "PosInfo" "CMarkGFM" "cmark-gfm-0.2.1-Lma5Mgws1kz7kaez4QT2yx" 'False) (C1 ('MetaCons "PosInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "startLine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "startColumn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "endLine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "endColumn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))) |
Constructors
PERIOD_DELIM | |
PAREN_DELIM |
Instances
Eq DelimType # | |
Data DelimType # | |
Defined in CMarkGFM 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 :: forall r r'. (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 # | |
Defined in CMarkGFM | |
Read DelimType # | |
Show DelimType # | |
Generic DelimType # | |
type Rep DelimType # | |
Constructors
BULLET_LIST | |
ORDERED_LIST |
Instances
Eq ListType # | |
Data ListType # | |
Defined in CMarkGFM 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 :: forall r r'. (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 # | |
Read ListType # | |
Show ListType # | |
Generic ListType # | |
type Rep ListType # | |
data ListAttributes #
Constructors
ListAttributes | |
Instances
Eq ListAttributes # | |
Defined in CMarkGFM Methods (==) :: ListAttributes -> ListAttributes -> Bool (/=) :: ListAttributes -> ListAttributes -> Bool | |
Data ListAttributes # | |
Defined in CMarkGFM 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 :: forall r r'. (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 # | |
Defined in CMarkGFM Methods compare :: ListAttributes -> ListAttributes -> Ordering (<) :: ListAttributes -> ListAttributes -> Bool (<=) :: ListAttributes -> ListAttributes -> Bool (>) :: ListAttributes -> ListAttributes -> Bool (>=) :: ListAttributes -> ListAttributes -> Bool max :: ListAttributes -> ListAttributes -> ListAttributes min :: ListAttributes -> ListAttributes -> ListAttributes | |
Read ListAttributes # | |
Defined in CMarkGFM Methods readsPrec :: Int -> ReadS ListAttributes readList :: ReadS [ListAttributes] readPrec :: ReadPrec ListAttributes readListPrec :: ReadPrec [ListAttributes] | |
Show ListAttributes # | |
Defined in CMarkGFM Methods showsPrec :: Int -> ListAttributes -> ShowS show :: ListAttributes -> String showList :: [ListAttributes] -> ShowS | |
Generic ListAttributes # | |
Defined in CMarkGFM Associated Types type Rep ListAttributes :: Type -> Type | |
type Rep ListAttributes # | |
Defined in CMarkGFM type Rep ListAttributes = D1 ('MetaData "ListAttributes" "CMarkGFM" "cmark-gfm-0.2.1-Lma5Mgws1kz7kaez4QT2yx" 'False) (C1 ('MetaCons "ListAttributes" 'PrefixI 'True) ((S1 ('MetaSel ('Just "listType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ListType) :*: S1 ('MetaSel ('Just "listTight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "listStart") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "listDelim") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DelimType)))) |
data TableCellAlignment #
Constructors
NoAlignment | |
LeftAligned | |
CenterAligned | |
RightAligned |
Instances
Eq TableCellAlignment # | |
Defined in CMarkGFM Methods (==) :: TableCellAlignment -> TableCellAlignment -> Bool (/=) :: TableCellAlignment -> TableCellAlignment -> Bool | |
Data TableCellAlignment # | |
Defined in CMarkGFM Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TableCellAlignment -> c TableCellAlignment gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TableCellAlignment toConstr :: TableCellAlignment -> Constr dataTypeOf :: TableCellAlignment -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TableCellAlignment) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TableCellAlignment) gmapT :: (forall b. Data b => b -> b) -> TableCellAlignment -> TableCellAlignment gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TableCellAlignment -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TableCellAlignment -> r gmapQ :: (forall d. Data d => d -> u) -> TableCellAlignment -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> TableCellAlignment -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> TableCellAlignment -> m TableCellAlignment gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TableCellAlignment -> m TableCellAlignment gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TableCellAlignment -> m TableCellAlignment | |
Ord TableCellAlignment # | |
Defined in CMarkGFM Methods compare :: TableCellAlignment -> TableCellAlignment -> Ordering (<) :: TableCellAlignment -> TableCellAlignment -> Bool (<=) :: TableCellAlignment -> TableCellAlignment -> Bool (>) :: TableCellAlignment -> TableCellAlignment -> Bool (>=) :: TableCellAlignment -> TableCellAlignment -> Bool max :: TableCellAlignment -> TableCellAlignment -> TableCellAlignment min :: TableCellAlignment -> TableCellAlignment -> TableCellAlignment | |
Read TableCellAlignment # | |
Defined in CMarkGFM Methods readsPrec :: Int -> ReadS TableCellAlignment readList :: ReadS [TableCellAlignment] readPrec :: ReadPrec TableCellAlignment readListPrec :: ReadPrec [TableCellAlignment] | |
Show TableCellAlignment # | |
Defined in CMarkGFM Methods showsPrec :: Int -> TableCellAlignment -> ShowS show :: TableCellAlignment -> String showList :: [TableCellAlignment] -> ShowS | |
Generic TableCellAlignment # | |
Defined in CMarkGFM Associated Types type Rep TableCellAlignment :: Type -> Type Methods from :: TableCellAlignment -> Rep TableCellAlignment x to :: Rep TableCellAlignment x -> TableCellAlignment | |
type Rep TableCellAlignment # | |
Defined in CMarkGFM type Rep TableCellAlignment = D1 ('MetaData "TableCellAlignment" "CMarkGFM" "cmark-gfm-0.2.1-Lma5Mgws1kz7kaez4QT2yx" 'False) ((C1 ('MetaCons "NoAlignment" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LeftAligned" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CenterAligned" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RightAligned" 'PrefixI 'False) (U1 :: Type -> Type))) |
data CMarkOption #
data CMarkExtension #