commonmark-0.1.0.1: Pure Haskell commonmark parser.

Safe HaskellSafe
LanguageHaskell2010

Commonmark.Blocks

Contents

Synopsis

Documentation

mkBlockParser Source #

Arguments

:: (Monad m, IsBlock il bl) 
=> [BlockSpec m il bl]

Defines block syntax

-> [BlockParser m il bl bl]

Parsers to run at end

-> (ReferenceMap -> [Tok] -> m (Either ParseError il))

Inline parser

-> [BlockParser m il bl Attributes]

attribute parsers

-> [Tok]

Tokenized commonmark input

-> m (Either ParseError bl)

Result or error

defaultBlockSpecs :: (Monad m, IsBlock il bl) => [BlockSpec m il bl] Source #

data BlockSpec m il bl Source #

Defines a block-level element type.

Constructors

BlockSpec 

Fields

Instances
Show (BlockSpec m il bl) Source # 
Instance details

Defined in Commonmark.Blocks

Methods

showsPrec :: Int -> BlockSpec m il bl -> ShowS #

show :: BlockSpec m il bl -> String #

showList :: [BlockSpec m il bl] -> ShowS #

data BlockData m il bl Source #

Instances
Show (BlockData m il bl) Source # 
Instance details

Defined in Commonmark.Blocks

Methods

showsPrec :: Int -> BlockData m il bl -> ShowS #

show :: BlockData m il bl -> String #

showList :: [BlockData m il bl] -> ShowS #

defBlockData :: BlockSpec m il bl -> BlockData m il bl Source #

type BlockNode m il bl = Tree (BlockData m il bl) Source #

type BlockParser m il bl = ParsecT [Tok] (BPState m il bl) m Source #

data LinkInfo Source #

Instances
Show LinkInfo Source # 
Instance details

Defined in Commonmark.ReferenceMap

defaultFinalizer :: Monad m => BlockNode m il bl -> BlockNode m il bl -> BlockParser m il bl (BlockNode m il bl) Source #

runInlineParser :: Monad m => [Tok] -> BlockParser m il bl il Source #

addNodeToStack :: Monad m => BlockNode m bl il -> BlockParser m bl il () Source #

collapseNodeStack :: [BlockNode m il bl] -> BlockParser m il bl (BlockNode m il bl) Source #

bspec :: BlockNode m il bl -> BlockSpec m il bl Source #

endOfBlock :: Monad m => BlockParser m il bl () Source #

renderChildren :: (Monad m, IsBlock il bl) => BlockNode m il bl -> BlockParser m il bl [bl] Source #

BlockSpecs

docSpec :: (Monad m, IsBlock il bl, Monoid bl) => BlockSpec m il bl Source #

indentedCodeSpec :: (Monad m, IsBlock il bl) => BlockSpec m il bl Source #

fencedCodeSpec :: (Monad m, IsBlock il bl) => BlockSpec m il bl Source #

blockQuoteSpec :: (Monad m, IsBlock il bl) => BlockSpec m il bl Source #

atxHeadingSpec :: (Monad m, IsBlock il bl) => BlockSpec m il bl Source #

setextHeadingSpec :: (Monad m, IsBlock il bl) => BlockSpec m il bl Source #

thematicBreakSpec :: (Monad m, IsBlock il bl) => BlockSpec m il bl Source #

listItemSpec :: (Monad m, IsBlock il bl) => BlockParser m il bl ListType -> BlockSpec m il bl Source #

rawHtmlSpec :: (Monad m, IsBlock il bl) => BlockSpec m il bl Source #

attributeSpec :: (Monad m, IsBlock il bl) => BlockSpec m il bl Source #

paraSpec :: (Monad m, IsBlock il bl) => BlockSpec m il bl Source #

plainSpec :: (Monad m, IsBlock il bl) => BlockSpec m il bl Source #