Skip to content
Browse files

Fixed blockquote parser to allow lazy syntax.

('>' at beginning of first line in a sequence only.)
  • Loading branch information...
1 parent ba78b2e commit dd79c1b3bc794e3f795f4c06224e24d5d053500d @jgm committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 Markdown.hs
View
3 Markdown.hs
@@ -189,7 +189,8 @@ doc = mdo
para // plain
para <- newRule $ many1 inline <<- newline <<- many1 blankline ## Para
plain <- newRule $ many1 inline <<- optional blankline ## Plain
- blockquote <- newRule $ many1 blockquoteLine <++> many blankline ## (\ls -> BlockQuote [Markdown $ concat ls ++ "\n"])
+ blockquote <- newRule $ many1 (many1 blockquoteLine <++> many (doesNotMatch blankline ->> anyline) <++>
+ many blankline ## concat) ## (\ls -> BlockQuote [Markdown $ concat ls ++ "\n"])
let setextHeadingWith lev c = many1 (doesNotMatch endline ->> inline) <<- newline <<-
text (replicate 3 c) <<- (many (char c)) <<- newline ## Heading lev

0 comments on commit dd79c1b

Please sign in to comment.
Something went wrong with that request. Please try again.