diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/RST.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 3132e78be..cec4f9313 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -112,7 +112,7 @@ parseRST = do "RST source, second pass" input of Left err -> error $ "\nError:\n" ++ show err Right result -> - (filter isNotAnonKeyBlock result) + filter isNotAnonKeyBlock result let (blocks'', title) = if stateStandalone state then titleTransform blocks' else (blocks', []) @@ -352,16 +352,13 @@ rawLaTeXBlock = try (do -- blockQuote = try (do - block <- indentedBlock True + raw <- indentedBlock True -- parse the extracted block, which may contain various block elements: - state <- getState - let parsed = case runParser parseBlocks - (state {stateParserContext = BlockQuoteState}) - "block" (block ++ "\n\n") of - Left err -> error $ "Raw block:\n" ++ show block ++ - "\nError:\n" ++ show err - Right result -> result - return (BlockQuote parsed)) + rest <- getInput + setInput $ raw ++ "\n\n" + contents <- parseBlocks + setInput rest + return (BlockQuote contents)) -- -- list blocks |