@@ -195,10 +195,7 @@ noteBlock = try $ do
195 raw <- sepBy rawLines (try (blankline >> indentSpaces))
195 raw <- sepBy rawLines (try (blankline >> indentSpaces))
196 optional blanklines
196 optional blanklines
197 -- parse the extracted text, which may contain various block elements:
197 -- parse the extracted text, which may contain various block elements:
199− setInput $ (joinWithSep "\n" raw) ++ "\n\n"
198+ contents <- parseFromString parseBlocks $ (joinWithSep "\n" raw) ++ "\n\n"
200− contents <- parseBlocks
202 return $ NoteBlock ref contents
199 return $ NoteBlock ref contents
@@ -307,10 +304,7 @@ emailBlockQuote = try $ do
307blockQuote = do
304blockQuote = do
308 raw <- emailBlockQuote <|> emacsBoxQuote
305 raw <- emailBlockQuote <|> emacsBoxQuote
309 -- parse the extracted block, which may contain various block elements:
306 -- parse the extracted block, which may contain various block elements:
311− setInput $ (joinWithSep "\n" raw) ++ "\n\n"
307+ contents <- parseFromString parseBlocks $ (joinWithSep "\n" raw) ++ "\n\n"
312− contents <- parseBlocks
314 return $ BlockQuote contents
308 return $ BlockQuote contents
@@ -393,11 +387,8 @@ listItem start = try $ do
393 let oldContext = stateParserContext state
387 let oldContext = stateParserContext state
394 setState $ state {stateParserContext = ListItemState}
388 setState $ state {stateParserContext = ListItemState}
395 -- parse the extracted block, which may contain various block elements:
389 -- parse the extracted block, which may contain various block elements:
397 let raw = concat (first:continuations)
390 let raw = concat (first:continuations)
399− contents <- parseBlocks
391+ contents <- parseFromString parseBlocks raw
401 updateState (\st -> st {stateParserContext = oldContext})
392 updateState (\st -> st {stateParserContext = oldContext})
402 return contents
393 return contents
@@ -419,10 +410,7 @@ definitionListItem = try $ do
419 state <- getState
410 state <- getState
420 let oldContext = stateParserContext state
411 let oldContext = stateParserContext state
421 -- parse the extracted block, which may contain various block elements:
412 -- parse the extracted block, which may contain various block elements:
423− setInput (concat raw)
424− contents <- parseBlocks
413+ contents <- parseFromString parseBlocks $ concat raw
426 updateState (\st -> st {stateParserContext = oldContext})
414 updateState (\st -> st {stateParserContext = oldContext})
427 return ((normalizeSpaces term), contents)
415 return ((normalizeSpaces term), contents)