@@ -291,11 +291,11 @@ noteBlock = try $ do
291291 char ':'
292292 optional blankline
293293 optional indentSpaces
294− raw <- sepBy rawLines
295− (try (blankline >> indentSpaces >>
296− notFollowedBy blankline))
294+ first <- rawLines
295+ rest <- many $ try $ blanklines >> indentSpaces >> rawLines
296+ let raw = unlines (first:rest) ++ "\n"
297297 optional blanklines
298− parsed <- parseFromString parseBlocks $ unlines raw ++ "\n"
298+ parsed <- parseFromString parseBlocks raw
299299 let newnote = (ref, parsed)
300300 updateState $ \s -> s { stateNotes' = newnote : stateNotes' s }
301301 return mempty
@@ -517,10 +517,13 @@ emailBlockQuoteStart = try $ skipNonindentSpaces >> char '>' >>~ optional (char
517517emailBlockQuote :: Parser [Char] ParserState [String]
518518emailBlockQuote = try $ do
519519 emailBlockQuoteStart
520− raw <- sepBy (many (nonEndline <|>
521− (try (endline >> notFollowedBy emailBlockQuoteStart >>
522− return '\n'))))
523− (try (newline >> emailBlockQuoteStart))
520+ let emailLine = many $ nonEndline <|> try
521+ (endline >> notFollowedBy emailBlockQuoteStart >>
522+ return '\n')
523+ let emailSep = try (newline >> emailBlockQuoteStart)
524+ first <- emailLine
525+ rest <- many $ try $ emailSep >> emailLine
526+ let raw = first:rest
524527 newline <|> (eof >> return '\n')
525528 optional blanklines
526529 return raw