-- Parse a blockquote, which is a greater-than sign followed by a paragraph.
parseBlockquote::ReadPMdToken
parseBlockquote=do
char'>'
Blockquote<$>(parseBlockquote<++parsePara)-- Parse another blockquote or a regular paragraph, wrap it in a blockquote.
quotedLines<-parseQuotedLines
-- remaining <- look
-- let quotedLines = fst $ leftmostLongestParse parseQuotedLines remaining
-- string (init $ unlines quotedLines)
letparsedQuotedLines=fst$leftmostLongestParse(many1(parseBlockquote<++parsePara))(init$unlinesquotedLines)-- unlines joins the lines together with a newline, and adds a trailing newline. init removes the trailing newline.
return(BlockquoteparsedQuotedLines)
-- Parse a nested list item.
parseUListNested::ReadPMdToken
parseUListNested=do
-- firstChar <- string " " <++ string "\t"
-- skipSpaces
-- restOfLine <- manyTill get (void (char '\n') <++ eof)
-- let restOfLineParsed = fst $ leftmostLongestParse parseLine restOfLine
return$Document(ParafirstLine:res)-- I only wrap this in a document because I want some way of converting [MdToken] to MdToken, without any overhead. There is no other reason to wrap it in a Document.
-- return $ Document parsedParas -- I wrap this in a document because I want some way of converting [MdToken] to MdToken, without any overhead. There is no other reason to wrap it in a Document.
-- Parse an unordered list item, which can be a line item or another list.