diff options
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/DokuWiki.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs index aef247164..26f9b5f62 100644 --- a/src/Text/Pandoc/Writers/DokuWiki.hs +++ b/src/Text/Pandoc/Writers/DokuWiki.hs @@ -153,7 +153,9 @@ blockToDokuWiki _ (CodeBlock (_,classes,_) str) = do blockToDokuWiki opts (BlockQuote blocks) = do contents <- blockListToDokuWiki opts blocks - return $ "> " ++ contents + if isSimpleBlockQuote blocks + then return $ "> " ++ contents + else return $ "<HTML><blockquote>\n" ++ contents ++ "</blockquote></HTML>" blockToDokuWiki opts (Table capt aligns _ headers rows') = do let alignStrings = map alignmentToString aligns @@ -308,6 +310,10 @@ isPlainOrPara (Plain _) = True isPlainOrPara (Para _) = True isPlainOrPara _ = False +isSimpleBlockQuote :: [Block] -> Bool +isSimpleBlockQuote [BlockQuote bs] = isSimpleBlockQuote bs +isSimpleBlockQuote [b] = isPlainOrPara b +isSimpleBlockQuote _ = False -- | Concatenates strings with line breaks between them. vcat :: [String] -> String |