@@ -1,4 +1,3 @@
1−{-# OPTIONS_GHC -Wall #-}
21{-# LANGUAGE PatternGuards #-}
32{-
43Copyright (C) 2008 Andrea Rossato <andrea.rossato@ing.unitn.it>
@@ -85,7 +84,7 @@ increaseIndent :: State WriterState ()
8584increaseIndent = modify $ \s -> s { stIndentPara = 1 + stIndentPara s }
8685
8786resetIndent :: State WriterState ()
88−resetIndent = modify $ \s -> s { stIndentPara = 0 }
87+resetIndent = modify $ \s -> s { stIndentPara = (stIndentPara s) - 1 }
8988
9089setInDefinitionList :: Bool -> State WriterState ()
9190setInDefinitionList b = modify $ \s -> s { stInDefinition = b }
@@ -224,11 +223,11 @@ inBlockQuote :: WriterOptions -> Int -> [Block] -> State WriterState Doc
224223inBlockQuote o i (b:bs)
225224 | BlockQuote l <- b = do increaseIndent
226225 ni <- paraStyle "Quotations" []
227− go ni =<< inBlockQuote o ni l
228− | Para l <- b = do go i =<< inParagraphTagsWithStyle ("P" ++ show i) <$> inlinesToOpenDocument o l
229− | otherwise = do go i =<< blockToOpenDocument o b
230− where go ni block = ($$) block <$> inBlockQuote o ni bs
231−inBlockQuote _ _ [] = resetIndent >> return empty
226+ go =<< inBlockQuote o ni (map plainToPara l)
227+ | Para l <- b = do go =<< inParagraphTagsWithStyle ("P" ++ show i) <$> inlinesToOpenDocument o l
228+ | otherwise = do go =<< blockToOpenDocument o b
229+ where go block = ($$) block <$> inBlockQuote o i bs
230+inBlockQuote _ _ [] = resetIndent >> return empty
232231
233232-- | Convert a list of Pandoc blocks to OpenDocument.
234233blocksToOpenDocument :: WriterOptions -> [Block] -> State WriterState Doc