From 798c57d9b2c75d2dde3d343e3a49c93664730630 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 13 Jul 2014 15:28:47 -0700 Subject: DokuWiki writer: More raw HTML fixes. (#1398) * Use uppercase HTML tags for block-level content, lowercase for inline. * Newline before closing HTML tag. --- src/Text/Pandoc/Writers/DokuWiki.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs index 3511c4862..47c583f05 100644 --- a/src/Text/Pandoc/Writers/DokuWiki.hs +++ b/src/Text/Pandoc/Writers/DokuWiki.hs @@ -120,7 +120,9 @@ blockToDokuWiki opts (Para inlines) = do blockToDokuWiki _ (RawBlock f str) | f == Format "dokuwiki" = return str - | f == Format "html" = return $ "\n" ++ str ++ "" + -- See https://www.dokuwiki.org/wiki:syntax + -- use uppercase HTML tag for block-level content: + | f == Format "html" = return $ "\n" ++ str ++ "\n" | otherwise = return "" blockToDokuWiki _ HorizontalRule = return "\n----\n" @@ -404,7 +406,7 @@ inlineToDokuWiki _ (Math _ str) = return $ "" ++ str ++ "" inlineToDokuWiki _ (RawInline f str) | f == Format "dokuwiki" = return str - | f == Format "html" = return str + | f == Format "html" = return $ "" ++ str ++ "" | otherwise = return "" inlineToDokuWiki _ (LineBreak) = return "\\\\ " -- cgit v1.2.3