diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs index 8c1d360aa..74418aa7e 100644 --- a/src/Text/Pandoc/Writers/DokuWiki.hs +++ b/src/Text/Pandoc/Writers/DokuWiki.hs @@ -178,7 +178,7 @@ blockToDokuWiki _ (CodeBlock (_,classes,_) str) = do blockToDokuWiki opts (BlockQuote blocks) = do contents <- blockListToDokuWiki opts blocks if isSimpleBlockQuote blocks - then return $ "> " ++ contents + then return $ unlines $ map ("> " ++) $ lines contents else return $ "
\n" ++ contents ++ "
" blockToDokuWiki opts (Table capt aligns _ headers rows) = do @@ -352,9 +352,7 @@ isPlainOrPara (Para _) = True isPlainOrPara _ = False isSimpleBlockQuote :: [Block] -> Bool -isSimpleBlockQuote [BlockQuote bs] = isSimpleBlockQuote bs -isSimpleBlockQuote [b] = isPlainOrPara b -isSimpleBlockQuote _ = False +isSimpleBlockQuote bs = all isPlainOrPara bs -- | Concatenates strings with line breaks between them. vcat :: [String] -> String diff --git a/tests/writer.dokuwiki b/tests/writer.dokuwiki index 704e79b87..dc14e9b00 100644 --- a/tests/writer.dokuwiki +++ b/tests/writer.dokuwiki @@ -268,7 +268,8 @@ Multiple blocks with italics:
//orange//

orange fruit

{ orange code block } ->

orange block quote

+>

orange block quote

+ Multiple definitions, tight: @@ -611,7 +612,7 @@ If you want, you can indent every line, but you can also be lazy and just indent )) > Notes can go in quotes.((In quote. -)) +> )) - And in list items.((In list.))