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