git.iko.soy/typeable/pandoc
on master help sign in
DokuWiki writer: More raw HTML fixes. (#1398)

* Use uppercase HTML tags for block-level content, lowercase for inline. * Newline before closing HTML tag.

commit798c57d9b2c75d2dde3d343e3a49c93664730630 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 13 Jul 2014, 15:28 (12 years ago) parentce0960b
1 file changed+4−2
src/Text/Pandoc/Writers/DokuWiki.hs+4−2
src/Text/Pandoc/Writers/DokuWiki.hs+4−2
@@ -120,7 +120,9 @@ blockToDokuWiki opts (Para inlines) = do
120120
121121blockToDokuWiki _ (RawBlock f str)
122122 | f == Format "dokuwiki" = return str
123− | f == Format "html" = return $ "<html>\n" ++ str ++ "</html>"
123+ -- See https://www.dokuwiki.org/wiki:syntax
124+ -- use uppercase HTML tag for block-level content:
125+ | f == Format "html" = return $ "<HTML>\n" ++ str ++ "\n</HTML>"
124126 | otherwise = return ""
125127
126128blockToDokuWiki _ HorizontalRule = return "\n----\n"
@@ -404,7 +406,7 @@ inlineToDokuWiki _ (Math _ str) = return $ "<math>" ++ str ++ "</math>"
404406
405407inlineToDokuWiki _ (RawInline f str)
406408 | f == Format "dokuwiki" = return str
407− | f == Format "html" = return str
409+ | f == Format "html" = return $ "<html>" ++ str ++ "</html>"
408410 | otherwise = return ""
409411
410412inlineToDokuWiki _ (LineBreak) = return "\\\\ "