diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-07-13 16:15:45 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-07-13 16:15:45 -0700 |
commit | 3e95fd586dfc286cb1bb7300521ccd2a6d11bc1f (patch) | |
tree | 80386ef50e02b499b1ce942542bff946ce838ced /src/Text/Pandoc/Writers | |
parent | 81088281dea1283159f7e0cf3d9c2a5082e06d8a (diff) | |
download | pandoc-3e95fd586dfc286cb1bb7300521ccd2a6d11bc1f.tar.gz |
Use raw HTML for complex block quotes.
As far as I can see, dokuwiki markup is pretty limited in what
can go in a `>` block quote: just a single line of paragraph
text. (#1398)
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 |